Package libcore.icu

Class TimeZoneNames


  • public final class TimeZoneNames
    extends Object
    Provides access to ICU's time zone name data.
    • Method Detail

      • getDisplayName

        public static String getDisplayName​(String[][] zoneStrings,
                                            String id,
                                            boolean daylight,
                                            int style)
        Returns the appropriate string from 'zoneStrings'. Used with getZoneStrings.
      • getZoneStrings

        public static String[][] getZoneStrings​(Locale locale)
        Returns an array of time zone strings, as used by DateFormatSymbols.getZoneStrings.
      • forLocale

        public static String[] forLocale​(Locale locale)
        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).
      • getExemplarLocation

        public static String getExemplarLocation​(String locale,
                                                 String tz)