List of usage examples for org.apache.commons.lang.time FastDateFormat getDateInstance
public static synchronized FastDateFormat getDateInstance(int style, TimeZone timeZone, Locale locale)
Gets a date formatter instance using the specified style, time zone and locale.
From source file:com.liferay.portal.util.FastDateFormatFactoryImpl.java
public Format getDate(int style, Locale locale, TimeZone timeZone) { ///////////// Start of modifications ///////////// locale = PlatformLocaleUtil.get().getAdminLocale(locale); ///////////// End of modifications ///////////// String key = getKey(style, locale, timeZone); Format format = _dateFormats.get(key); if (format == null) { format = FastDateFormat.getDateInstance(style, timeZone, locale); _dateFormats.put(key, format);// w w w . ja v a 2 s . co m } return format; }