Class TimeZoneData


  • public class TimeZoneData
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      TimeZoneData()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static com.squarespace.cldrengine.calendars.TimeZoneData.TZInfo fromUTC​(java.lang.String zoneId, long utc)
      Get the info for a time zone using a UTC timestamp.
      static java.lang.String getMetazone​(java.lang.String zoneId, long utc)
      For a given timezone identifier and UTC timestamp, return the metazone identifier or null if none exists.
      static java.lang.String getStableId​(java.lang.String id)
      Map a timezone identifier to the CLDR stable id
      static java.lang.String resolveId​(java.lang.String id)
      Resolve a lowercase time zone id or alias into the canonical proper-cased id.
      static java.lang.String substituteZoneAlias​(java.lang.String id)
      Maps a possible timezone alias to the correct id.
      static com.squarespace.cldrengine.calendars.TimeZoneData.TZInfo utcZone()
      UTC zone info.
      static java.util.List<java.lang.String> zoneIds()
      Returns a list of time zone ids.
      static ZoneInfo zoneInfoFromUTC​(java.lang.String zoneId, long utc)
      Lookup the zoneinfo record for the given timezone id and UTC timestamp.
      static boolean zoneIsStable​(java.lang.String zoneId)  
      static ZoneMeta zoneMeta​(java.lang.String id)
      Metadata related to a zone, such as the list of country codes that overlap with the zone, the latitude and longitude, and the current standard offset, in milliseconds.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TimeZoneData

        public TimeZoneData()
    • Method Detail

      • substituteZoneAlias

        public static java.lang.String substituteZoneAlias​(java.lang.String id)
        Maps a possible timezone alias to the correct id.
      • zoneInfoFromUTC

        public static ZoneInfo zoneInfoFromUTC​(java.lang.String zoneId,
                                               long utc)
        Lookup the zoneinfo record for the given timezone id and UTC timestamp.
      • zoneIsStable

        public static boolean zoneIsStable​(java.lang.String zoneId)
      • zoneMeta

        public static ZoneMeta zoneMeta​(java.lang.String id)
        Metadata related to a zone, such as the list of country codes that overlap with the zone, the latitude and longitude, and the current standard offset, in milliseconds. These can be used to display user interfaces for selecting a zone. If the zone identifier does not match a known zone or alias this returns null.
      • getMetazone

        public static java.lang.String getMetazone​(java.lang.String zoneId,
                                                   long utc)
        For a given timezone identifier and UTC timestamp, return the metazone identifier or null if none exists.
      • fromUTC

        public static com.squarespace.cldrengine.calendars.TimeZoneData.TZInfo fromUTC​(java.lang.String zoneId,
                                                                                       long utc)
        Get the info for a time zone using a UTC timestamp.
      • utcZone

        public static com.squarespace.cldrengine.calendars.TimeZoneData.TZInfo utcZone()
        UTC zone info.
      • resolveId

        public static java.lang.String resolveId​(java.lang.String id)
        Resolve a lowercase time zone id or alias into the canonical proper-cased id.
      • zoneIds

        public static java.util.List<java.lang.String> zoneIds()
        Returns a list of time zone ids.
      • getStableId

        public static java.lang.String getStableId​(java.lang.String id)
        Map a timezone identifier to the CLDR stable id