diff --git a/api/src/com/todoroo/andlib/utility/DateUtilities.java b/api/src/com/todoroo/andlib/utility/DateUtilities.java index cf97ba3eb..fad5043c5 100644 --- a/api/src/com/todoroo/andlib/utility/DateUtilities.java +++ b/api/src/com/todoroo/andlib/utility/DateUtilities.java @@ -195,7 +195,7 @@ public class DateUtilities { /** * @return yesterday, today, tomorrow, or null */ - public static String getRelativeDay(Context context, long date) { + public static String getRelativeDay(Context context, long date, boolean abbreviated) { long today = clearTime(new Date()); long input = clearTime(new Date(date)); @@ -203,18 +203,25 @@ public class DateUtilities { return context.getString(R.string.today).toLowerCase(); if(today + ONE_DAY == input) - return context.getString(R.string.tmrw).toLowerCase(); + return context.getString(abbreviated ? R.string.tmrw : R.string.tomorrow).toLowerCase(); if(today == input + ONE_DAY) - return context.getString(R.string.yest).toLowerCase(); + return context.getString(abbreviated ? R.string.yest : R.string.yesterday).toLowerCase(); if(today + DateUtilities.ONE_WEEK >= input && today - DateUtilities.ONE_WEEK <= input) - return DateUtilities.getWeekdayShort(new Date(date)); + return abbreviated ? DateUtilities.getWeekdayShort(new Date(date)) : DateUtilities.getWeekday(new Date(date)); return DateUtilities.getDateStringHideYear(context, new Date(date)); } + /** + * Calls getRelativeDay with abbreviated parameter defaulted to true + */ + public static String getRelativeDay(Context context, long date) { + return DateUtilities.getRelativeDay(context, date, true); + } + private static long clearTime(Date date) { date.setTime(date.getTime() / 1000L * 1000); date.setHours(0); diff --git a/astrid/res/layout/astrid_reminder_view.xml b/astrid/res/layout/astrid_reminder_view.xml index 10dc43038..24150e121 100644 --- a/astrid/res/layout/astrid_reminder_view.xml +++ b/astrid/res/layout/astrid_reminder_view.xml @@ -32,44 +32,7 @@ - - - - - - - - +