/** * Returns the time formatter with the given formatting style * for the given locale. * @param style the given formatting style. For example, * SHORT for "h:mm a" in the US locale. * @param aLocale the given locale. * @return a time formatter. * @stable ICU 2.0 */ public final static DateFormat getTimeInstance(int style, Locale aLocale) { return new DateFormat(java.text.DateFormat.getTimeInstance(getJDKFormatStyle(style), aLocale)); }
/** * Returns the date formatter with the given formatting style * for the given locale. * @param style the given formatting style. For example, * SHORT for "M/d/yy" in the US locale. * @param aLocale the given locale. * @return a date formatter. * @stable ICU 2.0 */ public final static DateFormat getDateInstance(int style, Locale aLocale) { return new DateFormat(java.text.DateFormat.getDateInstance(getJDKFormatStyle(style), aLocale)); }
/** * Returns the time formatter with the given formatting style * for the given locale. * @param style the given formatting style. For example, * SHORT for "h:mm a" in the US locale. * @param aLocale the given locale. * @return a time formatter. * @stable ICU 2.0 */ public final static DateFormat getTimeInstance(int style, Locale aLocale) { return new DateFormat(java.text.DateFormat.getTimeInstance(getJDKFormatStyle(style), aLocale)); }
/** * Returns the date formatter with the given formatting style * for the given locale. * @param style the given formatting style. For example, * SHORT for "M/d/yy" in the US locale. * @param aLocale the given locale. * @return a date formatter. * @stable ICU 2.0 */ public final static DateFormat getDateInstance(int style, Locale aLocale) { return new DateFormat(java.text.DateFormat.getDateInstance(getJDKFormatStyle(style), aLocale)); }
/** * Returns the date/time formatter with the given formatting styles * for the given locale. * @param dateStyle the given date formatting style. * @param timeStyle the given time formatting style. * @param aLocale the given locale. * @return a date/time formatter. * @stable ICU 2.0 */ public final static DateFormat getDateTimeInstance( int dateStyle, int timeStyle, Locale aLocale) { if (dateStyle != NONE) { if (timeStyle != NONE) { return new DateFormat(java.text.DateFormat.getDateTimeInstance(getJDKFormatStyle(dateStyle), getJDKFormatStyle(timeStyle), aLocale)); } else { return new DateFormat(java.text.DateFormat.getDateInstance(getJDKFormatStyle(dateStyle), aLocale)); } } if (timeStyle != NONE) { return new DateFormat(java.text.DateFormat.getTimeInstance(getJDKFormatStyle(timeStyle), aLocale)); } return null; }
/** * Returns the date/time formatter with the given formatting styles * for the given locale. * @param dateStyle the given date formatting style. * @param timeStyle the given time formatting style. * @param aLocale the given locale. * @return a date/time formatter. * @stable ICU 2.0 */ public final static DateFormat getDateTimeInstance( int dateStyle, int timeStyle, Locale aLocale) { if (dateStyle != NONE) { if (timeStyle != NONE) { return new DateFormat(java.text.DateFormat.getDateTimeInstance(getJDKFormatStyle(dateStyle), getJDKFormatStyle(timeStyle), aLocale)); } else { return new DateFormat(java.text.DateFormat.getDateInstance(getJDKFormatStyle(dateStyle), aLocale)); } } if (timeStyle != NONE) { return new DateFormat(java.text.DateFormat.getTimeInstance(getJDKFormatStyle(timeStyle), aLocale)); } return null; }
/** * Returns the time formatter with the given formatting style * for the given locale. * @param style the given formatting style. For example, * SHORT for "h:mm a" in the US locale. * @param locale the given ulocale. * @return a time formatter. * @stable ICU 3.2 */ public final static DateFormat getTimeInstance(int style, ULocale locale) { return new DateFormat(java.text.DateFormat.getTimeInstance(getJDKFormatStyle(style), locale.toLocale())); }
/** * Returns the date formatter with the given formatting style * for the given locale. * @param style the given formatting style. For example, * SHORT for "M/d/yy" in the US locale. * @param locale the given ulocale. * @return a date formatter. * @stable ICU 3.2 */ public final static DateFormat getDateInstance(int style, ULocale locale) { return new DateFormat(java.text.DateFormat.getDateInstance(getJDKFormatStyle(style), locale.toLocale())); }
/** * Returns the date formatter with the given formatting style * for the given locale. * @param style the given formatting style. For example, * SHORT for "M/d/yy" in the US locale. * @param locale the given ulocale. * @return a date formatter. * @stable ICU 3.2 */ public final static DateFormat getDateInstance(int style, ULocale locale) { return new DateFormat(java.text.DateFormat.getDateInstance(getJDKFormatStyle(style), locale.toLocale())); }
/** * Returns the time formatter with the given formatting style * for the given locale. * @param style the given formatting style. For example, * SHORT for "h:mm a" in the US locale. * @param locale the given ulocale. * @return a time formatter. * @stable ICU 3.2 */ public final static DateFormat getTimeInstance(int style, ULocale locale) { return new DateFormat(java.text.DateFormat.getTimeInstance(getJDKFormatStyle(style), locale.toLocale())); }
/** * Returns the date/time formatter with the given formatting styles * for the given locale. * @param dateStyle the given date formatting style. * @param timeStyle the given time formatting style. * @param locale the given ulocale. * @return a date/time formatter. * @stable ICU 3.2 */ public final static DateFormat getDateTimeInstance( int dateStyle, int timeStyle, ULocale locale) { if (dateStyle != NONE) { if (timeStyle != NONE) { return new DateFormat(java.text.DateFormat.getDateTimeInstance(getJDKFormatStyle(dateStyle), getJDKFormatStyle(timeStyle), locale.toLocale())); } else { return new DateFormat(java.text.DateFormat.getDateInstance(getJDKFormatStyle(dateStyle), locale.toLocale())); } } if (timeStyle != NONE) { return new DateFormat(java.text.DateFormat.getTimeInstance(getJDKFormatStyle(timeStyle), locale.toLocale())); } return null; }
/** * Returns the date/time formatter with the given formatting styles * for the given locale. * @param dateStyle the given date formatting style. * @param timeStyle the given time formatting style. * @param locale the given ulocale. * @return a date/time formatter. * @stable ICU 3.2 */ public final static DateFormat getDateTimeInstance( int dateStyle, int timeStyle, ULocale locale) { if (dateStyle != NONE) { if (timeStyle != NONE) { return new DateFormat(java.text.DateFormat.getDateTimeInstance(getJDKFormatStyle(dateStyle), getJDKFormatStyle(timeStyle), locale.toLocale())); } else { return new DateFormat(java.text.DateFormat.getDateInstance(getJDKFormatStyle(dateStyle), locale.toLocale())); } } if (timeStyle != NONE) { return new DateFormat(java.text.DateFormat.getTimeInstance(getJDKFormatStyle(timeStyle), locale.toLocale())); } return null; }
/** * Returns the time formatter with the given formatting style * for the default locale. * @param style the given formatting style. For example, * SHORT for "h:mm a" in the US locale. * @return a time formatter. * @stable ICU 2.0 */ public final static DateFormat getTimeInstance(int style) { return new DateFormat(java.text.DateFormat.getTimeInstance( getJDKFormatStyle(style), ULocale.getDefault(Category.FORMAT).toLocale())); }
/** * Returns the time formatter with the given formatting style * for the default locale. * @param style the given formatting style. For example, * SHORT for "h:mm a" in the US locale. * @return a time formatter. * @stable ICU 2.0 */ public final static DateFormat getTimeInstance(int style) { return new DateFormat(java.text.DateFormat.getTimeInstance( getJDKFormatStyle(style), ULocale.getDefault(Category.FORMAT).toLocale())); }
/** * Returns the date formatter with the given formatting style * for the default locale. * @param style the given formatting style. For example, * SHORT for "M/d/yy" in the US locale. * @return a date formatter. * @stable ICU 2.0 */ public final static DateFormat getDateInstance(int style) { return new DateFormat(java.text.DateFormat.getDateInstance( getJDKFormatStyle(style), ULocale.getDefault(Category.FORMAT).toLocale())); }
/** * Returns the date formatter with the given formatting style * for the default locale. * @param style the given formatting style. For example, * SHORT for "M/d/yy" in the US locale. * @return a date formatter. * @stable ICU 2.0 */ public final static DateFormat getDateInstance(int style) { return new DateFormat(java.text.DateFormat.getDateInstance( getJDKFormatStyle(style), ULocale.getDefault(Category.FORMAT).toLocale())); }
if (timeStyle != NONE) { return new DateFormat(java.text.DateFormat.getDateTimeInstance( getJDKFormatStyle(dateStyle), getJDKFormatStyle(timeStyle), ULocale.getDefault(Category.FORMAT).toLocale())); } else { return new DateFormat(java.text.DateFormat.getDateInstance( getJDKFormatStyle(dateStyle), ULocale.getDefault(Category.FORMAT).toLocale())); getJDKFormatStyle(timeStyle), ULocale.getDefault(Category.FORMAT).toLocale()));
if (timeStyle != NONE) { return new DateFormat(java.text.DateFormat.getDateTimeInstance( getJDKFormatStyle(dateStyle), getJDKFormatStyle(timeStyle), ULocale.getDefault(Category.FORMAT).toLocale())); } else { return new DateFormat(java.text.DateFormat.getDateInstance( getJDKFormatStyle(dateStyle), ULocale.getDefault(Category.FORMAT).toLocale())); getJDKFormatStyle(timeStyle), ULocale.getDefault(Category.FORMAT).toLocale()));