public static String dayOfWeekNameShort(final Object target, final Locale locale) { if (target == null) { return null; } return format(target, "EEE", locale); }
public static String monthName(final Object target, final Locale locale) { if (target == null) { return null; } return format(target, "MMMM", locale); }
public static String monthNameShort(final Object target, final Locale locale) { if (target == null) { return null; } return format(target, "MMM", locale); }
public static String dayOfWeekName(final Object target, final Locale locale) { if (target == null) { return null; } return format(target, "EEEE", locale); }
public String format(final Date target) { if (target == null) { return null; } try { return DateUtils.format(target, this.locale); } catch (final Exception e) { throw new TemplateProcessingException( "Error formatting date with standard format for locale " + this.locale, e); } }
public String format(final Calendar target) { if (target == null) { return null; } try { return DateUtils.format(target, this.locale); } catch (final Exception e) { throw new TemplateProcessingException( "Error formatting calendar with standard format for locale " + this.locale, e); } }
public String format(final Date target, final String pattern) { if (target == null) { return null; } try { return DateUtils.format(target, pattern, this.locale); } catch (final Exception e) { throw new TemplateProcessingException( "Error formatting date with format pattern \"" + pattern + "\"", e); } }
public String format(final Calendar target, final String pattern) { if (target == null) { return null; } try { return DateUtils.format(target, pattern, this.locale); } catch (final Exception e) { throw new TemplateProcessingException( "Error formatting calendar with format pattern \"" + pattern + "\"", e); } }
public String format(final Date target) { try { return DateUtils.format(target, this.locale); } catch (final Exception e) { throw new TemplateProcessingException( "Error formatting date with standard format for locale " + this.locale, e); } }
public String format(final Calendar target) { try { return DateUtils.format(target, this.locale); } catch (final Exception e) { throw new TemplateProcessingException( "Error formatting calendar with standard format for locale " + this.locale, e); } }
public String format(final Calendar target, final String pattern) { try { return DateUtils.format(target, pattern, this.locale); } catch (final Exception e) { throw new TemplateProcessingException( "Error formatting calendar with format pattern \"" + pattern + "\"", e); } }
public String format(final Date target, final String pattern) { try { return DateUtils.format(target, pattern, this.locale); } catch (final Exception e) { throw new TemplateProcessingException( "Error formatting date with format pattern \"" + pattern + "\"", e); } }
public static String monthName(final Object target, final Locale locale) { Validate.notNull(target, "Cannot retrieve month name from null"); return format(target, "MMMM", locale); }
public static String monthNameShort(final Object target, final Locale locale) { Validate.notNull(target, "Cannot retrieve month name short from null"); return format(target, "MMM", locale); }
public static String dayOfWeekName(final Object target, final Locale locale) { Validate.notNull(target, "Cannot retrieve day of week name from null"); return format(target, "EEEE", locale); }
public static String dayOfWeekNameShort(final Object target, final Locale locale) { Validate.notNull(target, "Cannot retrieve day of week name shortfrom null"); return format(target, "EEE", locale); }