diff --git a/app/src/main/java/org/andstatus/todoagenda/prefs/dateformat/DateFormatter.java b/app/src/main/java/org/andstatus/todoagenda/prefs/dateformat/DateFormatter.java index f1953d5a..1ab1acc1 100644 --- a/app/src/main/java/org/andstatus/todoagenda/prefs/dateformat/DateFormatter.java +++ b/app/src/main/java/org/andstatus/todoagenda/prefs/dateformat/DateFormatter.java @@ -61,8 +61,7 @@ public CharSequence formatDate(DateTime date) { return formatDateTime(date, DateUtils.FORMAT_ABBREV_ALL | DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_SHOW_WEEKDAY); case DEFAULT_DAYS: - return formatNumberOfDaysToEvent(context, 5, getNumberOfDaysToEvent(date)) + ", " + - formatDateTime(date, DateUtils.FORMAT_SHOW_DATE); + return formatDefaultWithNumberOfDaysToEvent(date); case DEFAULT_YTT: CharSequence str1 = formatNumberOfDaysToEventText(context, 3, getNumberOfDaysToEvent(date)); return (str1.length() == 0 ? "" : str1 + ", ") + formatDateTime(date, DateUtils.FORMAT_SHOW_DATE); @@ -76,6 +75,12 @@ public CharSequence formatDate(DateTime date) { } } + private CharSequence formatDefaultWithNumberOfDaysToEvent(DateTime date) { + String dateStub = "dateStub"; + return formatDateCustom(date, "BBB, '" + dateStub + "', BBBB") + .replace(dateStub, formatDateTime(date, DateUtils.FORMAT_SHOW_DATE)); + } + private String formatDateTime(DateTime date, int flags) { long millis = toJavaDate(date).getTime(); return DateUtils.formatDateRange(context,