public static String toDateString(Date date, Locale locale) { DateFormat df = getLocaleDateFormatter(locale); return df.format(date); }
public static String toDateTimeString(Date date, Locale locale, TimeZone tz) { DateFormat df = getLocaleDateFormatter(locale); synchronized (timeFormat) { timeFormat.setTimeZone(tz); return df.format(date) + " " + timeFormat.format(date); } }
public static String toDateTimeSecondsString(Date date, Locale locale, TimeZone tz) { DateFormat df = getLocaleDateFormatter(locale); synchronized (timeSecFormat) { timeSecFormat.setTimeZone(tz); return df.format(date) + " " + timeSecFormat.format(date); } }
public static String toDateTimeString(Date date, Locale locale) { DateFormat df = getLocaleDateFormatter(locale); synchronized (timeFormat) { timeFormat.setTimeZone(TimeZone.getDefault()); return df.format(date) + " " + timeFormat.format(date); } }
public static String toDateTimeSecondsString(Date date, Locale locale) { DateFormat df = getLocaleDateFormatter(locale); synchronized (timeSecFormat) { timeSecFormat.setTimeZone(TimeZone.getDefault()); return df.format(date) + " " + timeSecFormat.format(date); } }