public static String formatDateForDisplay(Locale locale, Date date) {
DateFormat dateFormat = DateFormat.getDateInstance(
DateFormat.MEDIUM, locale);
if (dateFormat instanceof SimpleDateFormat) {
SimpleDateFormat fmt = (SimpleDateFormat) dateFormat;
fmt.applyLocalizedPattern(fmt.toLocalizedPattern() + TIME_FORMAT);
return fmt.format(date);
} else {
dateFormat = DateFormat.getDateTimeInstance(
DateFormat.MEDIUM, DateFormat.LONG, locale);
return dateFormat.format(date);