Merge pull request #1694 from mfietz/issue/1693-npe-dateutils-abbrev
Prevent NPE in DateUtils.abbrev()
This commit is contained in:
commit
844dd17cb1
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user