|
virtual | ~TimeZoneNames () |
| Destructor. More...
|
|
virtual UBool | operator== (const TimeZoneNames &other) const =0 |
| Return true if the given TimeZoneNames objects are emantically equal. More...
|
|
UBool | operator!= (const TimeZoneNames &other) const |
| Return true if the given TimeZoneNames objects are not semantically equal. More...
|
|
virtual TimeZoneNames * | clone () const =0 |
| Clone this object polymorphically. More...
|
|
virtual StringEnumeration * | getAvailableMetaZoneIDs (UErrorCode &status) const =0 |
| Returns an enumeration of all available meta zone IDs. More...
|
|
virtual StringEnumeration * | getAvailableMetaZoneIDs (const UnicodeString &tzID, UErrorCode &status) const =0 |
| Returns an enumeration of all available meta zone IDs used by the given time zone. More...
|
|
virtual UnicodeString & | getMetaZoneID (const UnicodeString &tzID, UDate date, UnicodeString &mzID) const =0 |
| Returns the meta zone ID for the given canonical time zone ID at the given date. More...
|
|
virtual UnicodeString & | getReferenceZoneID (const UnicodeString &mzID, const char *region, UnicodeString &tzID) const =0 |
| Returns the reference zone ID for the given meta zone ID for the region. More...
|
|
virtual UnicodeString & | getMetaZoneDisplayName (const UnicodeString &mzID, UTimeZoneNameType type, UnicodeString &name) const =0 |
| Returns the display name of the meta zone. More...
|
|
virtual UnicodeString & | getTimeZoneDisplayName (const UnicodeString &tzID, UTimeZoneNameType type, UnicodeString &name) const =0 |
| Returns the display name of the time zone. More...
|
|
virtual UnicodeString & | getExemplarLocationName (const UnicodeString &tzID, UnicodeString &name) const |
| Returns the exemplar location name for the given time zone. More...
|
|
virtual UnicodeString & | getDisplayName (const UnicodeString &tzID, UTimeZoneNameType type, UDate date, UnicodeString &name) const |
| Returns the display name of the time zone at the given date. More...
|
|
virtual MatchInfoCollection * | find (const UnicodeString &text, int32_t start, uint32_t types, UErrorCode &status) const =0 |
| Finds time zone name prefix matches for the input text at the given offset and returns a collection of the matches. More...
|
|
virtual | ~UObject () |
| Destructor. More...
|
|
TimeZoneNames
is an abstract class representing the time zone display name data model defined by UTS#35 Unicode Locale Data Markup Language (LDML).
The model defines meta zone, which is used for storing a set of display names. A meta zone can be shared by multiple time zones. Also a time zone may have multiple meta zone historic mappings.
For example, people in the United States refer the zone used by the east part of North America as "Eastern Time". The tz database contains multiple time zones "America/New_York", "America/Detroit", "America/Montreal" and some others that belong to "Eastern Time". However, assigning different display names to these time zones does not make much sense for most of people.
In CLDR (which uses LDML for representing locale data), the display name "Eastern Time" is stored as long generic display name of a meta zone identified by the ID "America_Eastern". Then, there is another table maintaining the historic mapping to meta zones for each time zone. The time zones in the above example ("America/New_York", "America/Detroit"...) are mapped to the meta zone "America_Eastern".
Sometimes, a time zone is mapped to a different time zone in the past. For example, "America/Indiana/Knox" had been moving "Eastern Time" and "Central Time" back and forth. Therefore, it is necessary that time zone to meta zones mapping data are stored by date range.
Note: The methods in this class assume that time zone IDs are already canonicalized. For example, you may not get proper result returned by a method with time zone ID "America/Indiana/Indianapolis", because it's not a canonical time zone ID (the canonical time zone ID for the time zone is "America/Indianapolis". See TimeZone#getCanonicalID(const UnicodeString& id, UnicodeString& canonicalID, UErrorCode& status) about ICU canonical time zone IDs.
In CLDR, most of time zone display names except location names are provided through meta zones. But a time zone may have a specific name that is not shared with other time zones.
For example, time zone "Europe/London" has English long name for standard time "Greenwich Mean Time", which is also shared with other time zones. However, the long name for daylight saving time is "British Summer Time", which is only used for "Europe/London".
getTimeZoneDisplayName is designed for accessing a name only used by a single time zone. But is not necessarily mean that a subclass implementation use the same model with CLDR. A subclass implementation may provide time zone names only through getTimeZoneDisplayName, or only through getMetaZoneDisplayName, or both.
- Draft:
- This API may be changed in the future versions and was introduced in ICU 50
Definition at line 116 of file tznames.h.