List of usage examples for org.apache.commons.lang3.time FastDateFormat getDateTimeInstance
public static FastDateFormat getDateTimeInstance(final int dateStyle, final int timeStyle, final TimeZone timeZone, final Locale locale)
Gets a date/time formatter instance using the specified style, time zone and locale.
From source file:architecture.ee.component.core.lifecycle.ConfigServiceImpl.java
public String formatDateTime(Date date) { if (dateTimeFormat == null) { if (properties != null) { dateTimeFormat = FastDateFormat.getDateTimeInstance(2, 2, getTimeZone(), getLocale()); } else {/* w ww.j a v a2 s .com*/ FastDateFormat instance = FastDateFormat.getDateTimeInstance(2, 2, getTimeZone(), getLocale()); return instance.format(date); } } return dateTimeFormat.format(date); }
From source file:org.apache.openmeetings.service.mail.template.subject.AppointmentTemplate.java
protected String format(Date d, int fmt) { return FastDateFormat.getDateTimeInstance(fmt, fmt, tz, locale).format(d); }