/** * Returns the default number format for the current default locale. * The default format is one of the styles provided by the other * factory methods: getNumberInstance, getIntegerInstance, * getCurrencyInstance or getPercentInstance. * Exactly which one is locale-dependent. * @stable ICU 2.0 */ //Bug 4408066 [Richard/GCL] public final static NumberFormat getInstance() { return getInstance(ULocale.getDefault(Category.FORMAT), NUMBERSTYLE); }
/** * Convenience overload. * @stable ICU 2.0 */ static final public DateFormat getTimeInstance(Calendar cal, int timeStyle) { return getTimeInstance(cal, timeStyle, ULocale.getDefault(Category.FORMAT)); }
/** * {@icu} Returns this locale's script localized for display in the default <code>DISPLAY</code> locale. * @return the localized script name. * @see Category#DISPLAY * @stable ICU 3.0 */ public String getDisplayScript() { return getDisplayScriptInternal(this, getDefault(Category.DISPLAY)); }
/** * Create a DecimalFormatSymbols object for the default locale. * @stable ICU 2.0 */ public DecimalFormatSymbols() { this(new java.text.DecimalFormatSymbols(ULocale.getDefault(Category.FORMAT).toLocale())); }
/** * Empty constructor. Public for compatibility with JDK which lets the * compiler generate a default public constructor even though this is * an abstract class. * @stable ICU 2.6 */ public NumberFormat() { this(java.text.NumberFormat.getInstance(ULocale.getDefault(Category.FORMAT).toLocale())); }
/** * {@icu} Returns a keyword localized for display in the default <code>DISPLAY</code> locale. * @param keyword the keyword to be displayed. * @return the localized keyword name. * @see #getKeywords() * @see Category#DISPLAY * @stable ICU 3.0 */ public static String getDisplayKeyword(String keyword) { return getDisplayKeywordInternal(keyword, getDefault(Category.DISPLAY)); }
/** * Construct a <code>DangiCalendar</code> with the default time zone and locale. * * @internal * @deprecated This API is ICU internal only. */ @Deprecated public DangiCalendar() { this(TimeZone.getDefault(), ULocale.getDefault(Category.FORMAT)); }
/** * @draft ICU 2.8 * @provisional This API might change or be removed in a future release. */ public static Holiday[] getHolidays() { return getHolidays(ULocale.getDefault(Category.FORMAT)); }
/** * Return the name of this holiday in the language of the default <code>DISPLAY</code> locale. * @see Category#DISPLAY * @draft ICU 2.8 * @provisional This API might change or be removed in a future release. */ public String getDisplayName() { return getDisplayName(ULocale.getDefault(Category.DISPLAY)); }
/** * Create empty format using full name style, for example, "hours". * Use setLocale and/or setFormat to modify. * @deprecated ICU 53 use {@link MeasureFormat} instead. */ @Deprecated public TimeUnitFormat() { mf = MeasureFormat.getInstance(ULocale.getDefault(), FormatWidth.WIDE); isReady = false; style = FULL_NAME; }
/** * Creates a new cardinal-number <code>PluralFormat</code> for the default <code>FORMAT</code> locale. * This locale will be used to get the set of plural rules and for standard * number formatting. * @see Category#FORMAT * @stable ICU 3.8 */ public PluralFormat() { init(null, PluralType.CARDINAL, ULocale.getDefault(Category.FORMAT), null); }
/** * Returns this locale's script localized for display in the default <code>DISPLAY</code> locale. * @return the localized script name. * @see Category#DISPLAY * @stable ICU 3.0 */ public String getDisplayScript() { return getDisplayScriptInternal(this, getDefault(Category.DISPLAY)); }
/** * {@icu} Returns this locale's script localized for display in the default <code>DISPLAY</code> locale. * @return the localized script name. * @see Category#DISPLAY * @internal * @deprecated This API is ICU internal only. */ @Deprecated public String getDisplayScriptInContext() { return getDisplayScriptInContextInternal(this, getDefault(Category.DISPLAY)); }
/** * Returns this locale's country localized for display in the default <code>DISPLAY</code> locale. * <b>Warning: </b>this is for the region part of a valid locale ID; it cannot just be the region code (like "FR"). * To get the display name for a region alone, or for other options, use {@link LocaleDisplayNames} instead. * @return the localized country name. * @see Category#DISPLAY * @stable ICU 3.0 */ public String getDisplayCountry() { return getDisplayCountryInternal(this, getDefault(Category.DISPLAY)); }
/** * {@icu} Returns a specific style number format for default <code>FORMAT</code> locale. * @param style number format style * @see Category#FORMAT * @stable ICU 4.2 */ public final static NumberFormat getInstance(int style) { return getInstance(ULocale.getDefault(Category.FORMAT), style); }
/** * Returns a general-purpose number format for the current default <code>FORMAT</code> locale. * @see Category#FORMAT * @stable ICU 2.0 */ public final static NumberFormat getNumberInstance() { return getInstance(ULocale.getDefault(Category.FORMAT), NUMBERSTYLE); }
/** * Returns a general-purpose number format for the current default locale. * @stable ICU 2.0 */ public final static NumberFormat getNumberInstance() { return getInstance(ULocale.getDefault(Category.FORMAT), NUMBERSTYLE); }
/** * Convenience overload. * @stable ICU 2.0 */ static final public DateFormat getDateTimeInstance(Calendar cal, int dateStyle, int timeStyle) { return getDateTimeInstance(cal, dateStyle, timeStyle, ULocale.getDefault(Category.FORMAT)); }
/** * Gets the time formatter with the default formatting style * for the default locale. * @return a time formatter. * @stable ICU 2.0 */ public final static DateFormat getTimeInstance() { return new DateFormat(java.text.DateFormat.getTimeInstance( java.text.DateFormat.DEFAULT, ULocale.getDefault(Category.FORMAT).toLocale())); }
/** * Construct a <code>ChineseCalendar</code> with the give date set in the default time zone * with the default locale. * @param date The date to which the new calendar is set. * @stable ICU 4.0 */ public ChineseCalendar(Date date) { this(TimeZone.getDefault(), ULocale.getDefault(Category.FORMAT), CHINESE_EPOCH_YEAR, CHINA_ZONE); setTime(date); }