Show date and year for ancient (> 1 year old) messages

The timestamp shown for very old messages only includes the time without
a date at all. Fix it. FREEBIE.
This commit is contained in:
Veeti Paananen 2014-07-24 17:26:46 +03:00 committed by Jake McGinty
parent d979593cbb
commit 609e69a801

View File

@ -43,7 +43,7 @@ public class DateUtils extends android.text.format.DateUtils {
} else if (isWithinYear(millis)) { } else if (isWithinYear(millis)) {
formatFlags |= DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_NO_YEAR | DateUtils.FORMAT_ABBREV_ALL; formatFlags |= DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_NO_YEAR | DateUtils.FORMAT_ABBREV_ALL;
} else { } else {
formatFlags |= DateUtils.FORMAT_NUMERIC_DATE; formatFlags |= DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_ABBREV_ALL;
} }
} }
return DateUtils.formatDateTime(c, millis, formatFlags); return DateUtils.formatDateTime(c, millis, formatFlags);