由网友(活该孤独)分享简介:我有code这样的DateUtils.getRelativeDateTimeString(context, due, DateUtils.MINUTE_IN_MILLIS, DateUtils.WEEK_IN_MILLIS,0)这是格式化输出像which is outputting strings formatte...
我有code这样的
DateUtils.getRelativeDateTimeString(context, due, DateUtils.MINUTE_IN_MILLIS, DateUtils.WEEK_IN_MILLIS,0)
这是格式化输出像
which is outputting strings formatted like
in 23 hours, 6:18am
我不明白好android文档这种方法。
有一个内置的方式来剥离时间或改变逗号更像一句?
Is there a built in way to strip off the time or change the comma to be more sentence like?
任23时间或在上午06时1823小时将是preferable的电流输出。
Either of "in 23 hours" or "in 23 hours at 6:18am" would be preferable to the current output.
感谢。
推荐答案
我用不同的方法,并得到了23时间结果,我想
I have used a different method and gotten the "in 23 hours" result I wanted
DateUtils.getRelativeTimeSpanString(due,now, DateUtils.SECOND_IN_MILLIS)
相关推荐
最新文章