private static String defaultPattern() { LocaleData localeData = LocaleData.get(Locale.getDefault()); return localeData.getDateFormat(SHORT) + " " + localeData.getTimeFormat(SHORT); }
/** * Returns a {@code DateFormat} instance for formatting and parsing time * values in the specified style for the specified locale. * * @param style * one of SHORT, MEDIUM, LONG, FULL, or DEFAULT. * @param locale * the locale. * @throws IllegalArgumentException * if {@code style} is not one of SHORT, MEDIUM, LONG, FULL, or * DEFAULT. * @return the {@code DateFormat} instance for {@code style} and * {@code locale}. */ public static final DateFormat getTimeInstance(int style, Locale locale) { checkTimeStyle(style); return new SimpleDateFormat(LocaleData.get(locale).getTimeFormat(style), locale); }
/** * Returns a {@code DateFormat} instance for formatting and parsing dates * and time values in the specified styles for the specified locale. * * @param dateStyle * one of SHORT, MEDIUM, LONG, FULL, or DEFAULT. * @param timeStyle * one of SHORT, MEDIUM, LONG, FULL, or DEFAULT. * @param locale * the locale. * @return the {@code DateFormat} instance for {@code dateStyle}, * {@code timeStyle} and {@code locale}. * @throws IllegalArgumentException * if {@code dateStyle} or {@code timeStyle} is not one of * SHORT, MEDIUM, LONG, FULL, or DEFAULT. */ public static final DateFormat getDateTimeInstance(int dateStyle, int timeStyle, Locale locale) { checkTimeStyle(timeStyle); checkDateStyle(dateStyle); LocaleData localeData = LocaleData.get(locale); String pattern = localeData.getDateFormat(dateStyle) + " " + localeData.getTimeFormat(timeStyle); return new SimpleDateFormat(pattern, locale); }
private static String defaultPattern() { LocaleData localeData = LocaleData.get(Locale.getDefault()); return localeData.getDateFormat(SHORT) + " " + localeData.getTimeFormat(SHORT); }
private static String defaultPattern() { LocaleData localeData = LocaleData.get(Locale.getDefault()); return localeData.getDateFormat(SHORT) + " " + localeData.getTimeFormat(SHORT); }
private static String defaultPattern() { LocaleData localeData = LocaleData.get(Locale.getDefault()); return localeData.getDateFormat(SHORT) + " " + localeData.getTimeFormat(SHORT); }
private static String defaultPattern() { LocaleData localeData = LocaleData.get(Locale.getDefault()); return localeData.getDateFormat(SHORT) + " " + localeData.getTimeFormat(SHORT); }
private static String defaultPattern() { LocaleData localeData = LocaleData.get(Locale.getDefault()); return localeData.getDateFormat(SHORT) + " " + localeData.getTimeFormat(SHORT); }
private static String defaultPattern() { LocaleData localeData = LocaleData.get(Locale.getDefault()); return localeData.getDateFormat(SHORT) + " " + localeData.getTimeFormat(SHORT); }
/** * Returns a {@code DateFormat} instance for formatting and parsing time * values in the specified style for the specified locale. * * @param style * one of SHORT, MEDIUM, LONG, FULL, or DEFAULT. * @param locale * the locale. * @throws IllegalArgumentException * if {@code style} is not one of SHORT, MEDIUM, LONG, FULL, or * DEFAULT. * @return the {@code DateFormat} instance for {@code style} and * {@code locale}. */ public static final DateFormat getTimeInstance(int style, Locale locale) { checkTimeStyle(style); return new SimpleDateFormat(LocaleData.get(locale).getTimeFormat(style), locale); }
/** * Returns a {@code DateFormat} instance for formatting and parsing time * values in the specified style for the specified locale. * * @param style * one of SHORT, MEDIUM, LONG, FULL, or DEFAULT. * @param locale * the locale. * @throws IllegalArgumentException * if {@code style} is not one of SHORT, MEDIUM, LONG, FULL, or * DEFAULT. * @return the {@code DateFormat} instance for {@code style} and * {@code locale}. */ public static final DateFormat getTimeInstance(int style, Locale locale) { checkTimeStyle(style); return new SimpleDateFormat(LocaleData.get(locale).getTimeFormat(style), locale); }
/** * Returns a {@code DateFormat} instance for formatting and parsing time * values in the specified style for the specified locale. * * @param style * one of SHORT, MEDIUM, LONG, FULL, or DEFAULT. * @param locale * the locale. * @throws IllegalArgumentException * if {@code style} is not one of SHORT, MEDIUM, LONG, FULL, or * DEFAULT. * @return the {@code DateFormat} instance for {@code style} and * {@code locale}. */ public static final DateFormat getTimeInstance(int style, Locale locale) { checkTimeStyle(style); return new SimpleDateFormat(LocaleData.get(locale).getTimeFormat(style), locale); }
/** * Returns a {@code DateFormat} instance for formatting and parsing time * values in the specified style for the specified locale. * * @param style * one of SHORT, MEDIUM, LONG, FULL, or DEFAULT. * @param locale * the locale. * @throws IllegalArgumentException * if {@code style} is not one of SHORT, MEDIUM, LONG, FULL, or * DEFAULT. * @return the {@code DateFormat} instance for {@code style} and * {@code locale}. */ public static final DateFormat getTimeInstance(int style, Locale locale) { checkTimeStyle(style); return new SimpleDateFormat(LocaleData.get(locale).getTimeFormat(style), locale); }
/** * Returns a {@code DateFormat} instance for formatting and parsing time * values in the specified style for the specified locale. * * @param style * one of SHORT, MEDIUM, LONG, FULL, or DEFAULT. * @param locale * the locale. * @throws IllegalArgumentException * if {@code style} is not one of SHORT, MEDIUM, LONG, FULL, or * DEFAULT. * @return the {@code DateFormat} instance for {@code style} and * {@code locale}. */ public static final DateFormat getTimeInstance(int style, Locale locale) { checkTimeStyle(style); return new SimpleDateFormat(LocaleData.get(locale).getTimeFormat(style), locale); }
/** * Returns a {@code DateFormat} instance for formatting and parsing time * values in the specified style for the specified locale. * * @param style * one of SHORT, MEDIUM, LONG, FULL, or DEFAULT. * @param locale * the locale. * @throws IllegalArgumentException * if {@code style} is not one of SHORT, MEDIUM, LONG, FULL, or * DEFAULT. * @return the {@code DateFormat} instance for {@code style} and * {@code locale}. */ public static final DateFormat getTimeInstance(int style, Locale locale) { checkTimeStyle(style); return new SimpleDateFormat(LocaleData.get(locale).getTimeFormat(style), locale); }
/** * Returns a {@code DateFormat} instance for formatting and parsing dates * and time values in the specified styles for the specified locale. * * @param dateStyle * one of SHORT, MEDIUM, LONG, FULL, or DEFAULT. * @param timeStyle * one of SHORT, MEDIUM, LONG, FULL, or DEFAULT. * @param locale * the locale. * @return the {@code DateFormat} instance for {@code dateStyle}, * {@code timeStyle} and {@code locale}. * @throws IllegalArgumentException * if {@code dateStyle} or {@code timeStyle} is not one of * SHORT, MEDIUM, LONG, FULL, or DEFAULT. */ public static final DateFormat getDateTimeInstance(int dateStyle, int timeStyle, Locale locale) { checkTimeStyle(timeStyle); checkDateStyle(dateStyle); LocaleData localeData = LocaleData.get(locale); String pattern = localeData.getDateFormat(dateStyle) + " " + localeData.getTimeFormat(timeStyle); return new SimpleDateFormat(pattern, locale); }
/** * Returns a {@code DateFormat} instance for formatting and parsing dates * and time values in the specified styles for the specified locale. * * @param dateStyle * one of SHORT, MEDIUM, LONG, FULL, or DEFAULT. * @param timeStyle * one of SHORT, MEDIUM, LONG, FULL, or DEFAULT. * @param locale * the locale. * @return the {@code DateFormat} instance for {@code dateStyle}, * {@code timeStyle} and {@code locale}. * @throws IllegalArgumentException * if {@code dateStyle} or {@code timeStyle} is not one of * SHORT, MEDIUM, LONG, FULL, or DEFAULT. */ public static final DateFormat getDateTimeInstance(int dateStyle, int timeStyle, Locale locale) { checkTimeStyle(timeStyle); checkDateStyle(dateStyle); LocaleData localeData = LocaleData.get(locale); String pattern = localeData.getDateFormat(dateStyle) + " " + localeData.getTimeFormat(timeStyle); return new SimpleDateFormat(pattern, locale); }
/** * Returns a {@code DateFormat} instance for formatting and parsing dates * and time values in the specified styles for the specified locale. * * @param dateStyle * one of SHORT, MEDIUM, LONG, FULL, or DEFAULT. * @param timeStyle * one of SHORT, MEDIUM, LONG, FULL, or DEFAULT. * @param locale * the locale. * @return the {@code DateFormat} instance for {@code dateStyle}, * {@code timeStyle} and {@code locale}. * @throws IllegalArgumentException * if {@code dateStyle} or {@code timeStyle} is not one of * SHORT, MEDIUM, LONG, FULL, or DEFAULT. */ public static final DateFormat getDateTimeInstance(int dateStyle, int timeStyle, Locale locale) { checkTimeStyle(timeStyle); checkDateStyle(dateStyle); LocaleData localeData = LocaleData.get(locale); String pattern = localeData.getDateFormat(dateStyle) + " " + localeData.getTimeFormat(timeStyle); return new SimpleDateFormat(pattern, locale); }
/** * Returns a {@code DateFormat} instance for formatting and parsing dates * and time values in the specified styles for the specified locale. * * @param dateStyle * one of SHORT, MEDIUM, LONG, FULL, or DEFAULT. * @param timeStyle * one of SHORT, MEDIUM, LONG, FULL, or DEFAULT. * @param locale * the locale. * @return the {@code DateFormat} instance for {@code dateStyle}, * {@code timeStyle} and {@code locale}. * @throws IllegalArgumentException * if {@code dateStyle} or {@code timeStyle} is not one of * SHORT, MEDIUM, LONG, FULL, or DEFAULT. */ public static final DateFormat getDateTimeInstance(int dateStyle, int timeStyle, Locale locale) { checkTimeStyle(timeStyle); checkDateStyle(dateStyle); LocaleData localeData = LocaleData.get(locale); String pattern = localeData.getDateFormat(dateStyle) + " " + localeData.getTimeFormat(timeStyle); return new SimpleDateFormat(pattern, locale); }
/** * Returns a {@code DateFormat} instance for formatting and parsing dates * and time values in the specified styles for the specified locale. * * @param dateStyle * one of SHORT, MEDIUM, LONG, FULL, or DEFAULT. * @param timeStyle * one of SHORT, MEDIUM, LONG, FULL, or DEFAULT. * @param locale * the locale. * @return the {@code DateFormat} instance for {@code dateStyle}, * {@code timeStyle} and {@code locale}. * @throws IllegalArgumentException * if {@code dateStyle} or {@code timeStyle} is not one of * SHORT, MEDIUM, LONG, FULL, or DEFAULT. */ public static final DateFormat getDateTimeInstance(int dateStyle, int timeStyle, Locale locale) { checkTimeStyle(timeStyle); checkDateStyle(dateStyle); LocaleData localeData = LocaleData.get(locale); String pattern = localeData.getDateFormat(dateStyle) + " " + localeData.getTimeFormat(timeStyle); return new SimpleDateFormat(pattern, locale); }