支持时区的Android DateUtils.getRelativeTimeSpanString
目前,我正在寻找的功能,能够提供人性化的日期支持时区的Android DateUtils.getRelativeTimeSpanString,android,Android,目前,我正在寻找的功能,能够提供人性化的日期 DateUtils.getRelativeTimeSpanString已关闭,但不是我想要的 这是因为我需要处理多个国家的日期/时间 比如说, timestamp X may represent 6am in Country A, and 11pm in Country B timestamp Y may represent 8am in Country A, and 2am in Country B 因此,如果我现在使用时间戳Y作为,时间戳X作
DateUtils.getRelativeTimeSpanString
已关闭,但不是我想要的
这是因为我需要处理多个国家的日期/时间
比如说,
timestamp X may represent 6am in Country A, and 11pm in Country B
timestamp Y may represent 8am in Country A, and 2am in Country B
因此,如果我现在使用时间戳Y作为,时间戳X作为时间
For timezone in Country A, it should yield "today".
For timezone in Country B, it should yield "yesterday".
DateUtils.getRelativeTimeSpanString
但是不接受时区。是否有任何等效的库或函数能够通过接受时区来做类似的事情