@Test public void testJodaTimePatternsForStyle() { System.out.println(org.joda.time.format.DateTimeFormat.patternForStyle("SS", LocaleContextHolder.getLocale())); System.out.println(org.joda.time.format.DateTimeFormat.patternForStyle("MM", LocaleContextHolder.getLocale())); System.out.println(org.joda.time.format.DateTimeFormat.patternForStyle("LL", LocaleContextHolder.getLocale())); System.out.println(org.joda.time.format.DateTimeFormat.patternForStyle("FF", LocaleContextHolder.getLocale())); }
/** * Gets the optional date pattern. * * @return datePattern */ @Override public final String getDatePattern(Locale locale) { return DateTimeFormat.patternForStyle(dateStyle, locale); }
/** * Gets the optional date pattern. * * @return datePattern */ @Override public final String getDatePattern(Locale locale) { return DateTimeFormat.patternForStyle(dateStyle, locale); }
private String advancedFormattedCalendar(Calendar cal) { if (cal != null) { return DateTimeFormat.forPattern(DateTimeFormat.patternForStyle("LS", getLocale())).print( new DateTime(cal)); } return ""; }
private String formattedCalendarByStyle(Calendar calendar, String patternStyle) { if (calendar != null) { String pattern = DateTimeFormat.patternForStyle(patternStyle, getLocale()); return DateTimeFormat.forPattern(pattern).print(new DateTime(calendar)); } return ""; }
public static String longStyle(ITemplate template, DateTime dateTime) { Locale locale = null == template ? Act.appConfig().locale() : template.__curLocale(); return format(dateTime, DateTimeFormat.patternForStyle("LL", locale), locale, null); }
public static String shortStyle(ITemplate template, LocalDateTime dateTime) { Locale locale = null == template ? Act.appConfig().locale() : template.__curLocale(); return format(dateTime, DateTimeFormat.patternForStyle("SS", locale), locale, null); }
public static String shortStyle(ITemplate template, LocalDate LocalDate) { Locale locale = null == template ? Act.appConfig().locale() : template.__curLocale(); return format(LocalDate, DateTimeFormat.patternForStyle("S-", locale), locale, null); }
public static String shortStyle(ITemplate template, LocalTime LocalTime) { Locale locale = null == template ? Act.appConfig().locale() : template.__curLocale(); return format(LocalTime, DateTimeFormat.patternForStyle("-S", locale), locale, null); }
public static String mediumStyle(ITemplate template, LocalTime LocalTime) { Locale locale = null == template ? Act.appConfig().locale() : template.__curLocale(); return format(LocalTime, DateTimeFormat.patternForStyle("-M", locale), locale, null); }
public static String longStyle(ITemplate template, LocalTime LocalTime) { Locale locale = null == template ? Act.appConfig().locale() : template.__curLocale(); return format(LocalTime, DateTimeFormat.patternForStyle("-L", locale), locale, null); }
public static String shortStyle(ITemplate template, DateTime dateTime) { Locale locale = null == template ? Act.appConfig().locale() : template.__curLocale(); return format(dateTime, DateTimeFormat.patternForStyle("SS", locale), locale, null); }
public static String mediumStyle(ITemplate template, DateTime dateTime) { Locale locale = null == template ? Act.appConfig().locale() : template.__curLocale(); return format(dateTime, DateTimeFormat.patternForStyle("MM", locale), locale, null); }
public static String longStyle(ITemplate template, LocalDateTime dateTime) { Locale locale = null == template ? Act.appConfig().locale() : template.__curLocale(); return format(dateTime, DateTimeFormat.patternForStyle("LL", locale), locale, null); }
public static String longStyle(ITemplate template, DateTime dateTime) { Locale locale = null == template ? Act.appConfig().locale() : template.__curLocale(); return format(dateTime, DateTimeFormat.patternForStyle("LL", locale), locale, null); }
public static String mediumStyle(ITemplate template, LocalDate LocalDate) { Locale locale = null == template ? Act.appConfig().locale() : template.__curLocale(); return format(LocalDate, DateTimeFormat.patternForStyle("M-", locale), locale, null); }
public static String longStyle(ITemplate template, LocalDate LocalDate) { Locale locale = null == template ? Act.appConfig().locale() : template.__curLocale(); return format(LocalDate, DateTimeFormat.patternForStyle("L-", locale), locale, null); }
public static String mediumStyle(ITemplate template, LocalDateTime dateTime) { Locale locale = null == template ? Act.appConfig().locale() : template.__curLocale(); return format(dateTime, DateTimeFormat.patternForStyle("MM", locale), locale, null); }
public static String shortStyle(ITemplate template, LocalDate LocalDate) { Locale locale = null == template ? Act.appConfig().locale() : template.__curLocale(); return format(LocalDate, DateTimeFormat.patternForStyle("S-", locale), locale, null); }
public static String longStyle(ITemplate template, LocalDate LocalDate) { Locale locale = null == template ? Act.appConfig().locale() : template.__curLocale(); return format(LocalDate, DateTimeFormat.patternForStyle("L-", locale), locale, null); }