Prevent NPE

This commit is contained in:
Martin Fietz 2016-02-19 12:54:51 +01:00
parent 6715419d73
commit db084ec118
1 changed files with 3 additions and 0 deletions

View File

@ -145,6 +145,9 @@ public class DateUtils {
}
public static String formatAbbrev(final Context context, final Date date) {
if(date == null) {
return "";
}
GregorianCalendar cal = new GregorianCalendar();
cal.add(GregorianCalendar.YEAR, -1);
// some padding, because no one really remembers what day of the month it is