Fixes relative time formatting issue for dates in future
All variations of getRelativeTimeSpanString() now properly handle dates that are in the future. Prior, the version used by getRelativeDateTimeString() would occasionally show the time instead of a date when the future date was the same weekday as the current weekday. This resulted in the time output being duplicated, eg.: "11:23, 11:23" Change-Id: If20972a6942cce792fa233437f94dedfb71379f3 Signed-off-by: Steve Pomeroy <steve@staticfree.info>
This commit is contained in:
@@ -1618,7 +1618,7 @@ public class DateUtils
|
||||
|
||||
String result;
|
||||
long now = System.currentTimeMillis();
|
||||
long span = now - millis;
|
||||
long span = Math.abs(now - millis);
|
||||
|
||||
synchronized (DateUtils.class) {
|
||||
if (sNowTime == null) {
|
||||
|
||||
Reference in New Issue
Block a user