List of usage examples for org.apache.commons.lang3.time FastDateFormat getDateInstance
public static FastDateFormat getDateInstance(final int style, final TimeZone timeZone, final Locale locale)
Gets a date formatter instance using the specified style, time zone and locale.
From source file:architecture.ee.component.core.lifecycle.ConfigServiceImpl.java
public String formatDate(Date date) { if (dateFormat == null) { if (properties != null) { dateFormat = FastDateFormat.getDateInstance(2, getTimeZone(), getLocale()); } else {/*from w w w .j a v a2 s.c o m*/ FastDateFormat instance = FastDateFormat.getDateInstance(2, getTimeZone(), getLocale()); return instance.format(date); } } return dateFormat.format(date); }