Package libcore.icu
Class TimeZoneNames
java.lang.Object
libcore.icu.TimeZoneNames
public final class TimeZoneNames extends Object
Provides access to ICU's time zone name data.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTimeZoneNames.ZoneStringsCache -
Field Summary
Fields Modifier and Type Field Description static intLONG_NAMEstatic intLONG_NAME_DSTstatic intNAME_COUNTstatic intOLSON_NAMEstatic intSHORT_NAMEstatic intSHORT_NAME_DST -
Method Summary
Modifier and Type Method Description static String[]forLocale(Locale locale)Returns an array containing the time zone ids in use in the country corresponding to the given locale.static StringgetDisplayName(String[][] zoneStrings, String id, boolean daylight, int style)Returns the appropriate string from 'zoneStrings'.static String[][]getZoneStrings(Locale locale)Returns an array of time zone strings, as used by DateFormatSymbols.getZoneStrings.
-
Field Details
-
OLSON_NAME
public static final int OLSON_NAME- See Also:
- Constant Field Values
-
LONG_NAME
public static final int LONG_NAME- See Also:
- Constant Field Values
-
SHORT_NAME
public static final int SHORT_NAME- See Also:
- Constant Field Values
-
LONG_NAME_DST
public static final int LONG_NAME_DST- See Also:
- Constant Field Values
-
SHORT_NAME_DST
public static final int SHORT_NAME_DST- See Also:
- Constant Field Values
-
NAME_COUNT
public static final int NAME_COUNT- See Also:
- Constant Field Values
-
-
Method Details
-
getDisplayName
public static String getDisplayName(String[][] zoneStrings, String id, boolean daylight, int style)Returns the appropriate string from 'zoneStrings'. Used with getZoneStrings. -
getZoneStrings
Returns an array of time zone strings, as used by DateFormatSymbols.getZoneStrings. -
forLocale
Returns an array containing the time zone ids in use in the country corresponding to the given locale. This is not necessary for Java API, but is used by telephony as a fallback. We retrieve these strings from zone.tab rather than icu4c because the latter supplies them in alphabetical order where zone.tab has them in a kind of "importance" order (as defined in the zone.tab header).
-