Go to the documentation of this file.
18 #if !UCONFIG_NO_FORMATTING
321 #ifndef U_HIDE_INTERNAL_API
@ UTZNM_LONG_STANDARD
Long display name for standard time, such as "Eastern Standard Time".
virtual void loadAllDisplayNames(UErrorCode &status)
@ UTZNM_EXEMPLAR_LOCATION
Exemplar location name, such as "Los Angeles".
virtual UnicodeString & getExemplarLocationName(const UnicodeString &tzID, UnicodeString &name) const
Returns the exemplar location name for the given time zone.
Basic definitions for ICU, for both C and C++ APIs.
#define U_I18N_API
Set to export library symbols from inside the i18n library, and to import them from outside.
int8_t UBool
The ICU boolean type.
virtual UnicodeString & getMetaZoneDisplayName(const UnicodeString &mzID, UTimeZoneNameType type, UnicodeString &name) const =0
Returns the display name of the meta zone.
U_EXPORT UBool operator==(const StringPiece &x, const StringPiece &y)
Global operator == for StringPiece.
UBool operator!=(const TimeZoneNames &other) const
Return true if the given TimeZoneNames objects are not semantically equal.
UBool getMetaZoneIDAt(int32_t idx, UnicodeString &mzID) const
Gets the metazone ID of a match at the specified index.
virtual ~MatchInfoCollection()
Destructor.
@ UTZNM_UNKNOWN
Unknown display name type.
virtual TimeZoneNames * clone() const =0
Clone this object polymorphically.
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 o...
virtual ~TimeZoneNames()
Destructor.
UnicodeString is a string class that stores Unicode characters directly and provides similar function...
int32_t size() const
Returns the number of entries available in this object.
UObject is the common ICU "boilerplate" class.
MatchInfoCollection()
Constructor.
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers,...
Base class for 'pure' C++ implementations of uenum api.
@ UTZNM_SHORT_DAYLIGHT
Short display name for daylight saving time, such as "EDT".
UMemory is the common ICU base class.
virtual void getDisplayNames(const UnicodeString &tzID, const UTimeZoneNameType types[], int32_t numTypes, UDate date, UnicodeString dest[], UErrorCode &status) const
static TimeZoneNames * createInstance(const Locale &locale, UErrorCode &status)
Returns an instance of TimeZoneNames for the specified locale.
static TimeZoneNames * createTZDBInstance(const Locale &locale, UErrorCode &status)
Returns an instance of TimeZoneNames containing only short specific zone names (SHORT_STANDARD and SH...
#define U_CDECL_END
This is used to end a declaration of a library private ICU C API.
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.
#define U_CDECL_BEGIN
This is used to begin a declaration of a library private ICU C API.
@ UTZNM_LONG_DAYLIGHT
Long display name for daylight saving time, such as "Eastern Daylight Time".
UBool getTimeZoneIDAt(int32_t idx, UnicodeString &tzID) const
Gets the zone ID of a match at the specified index.
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.
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.
int32_t getMatchLengthAt(int32_t idx) const
Returns the match length of a match at the specified index.
void addZone(UTimeZoneNameType nameType, int32_t matchLength, const UnicodeString &tzID, UErrorCode &status)
Adds a zone match.
@ UTZNM_SHORT_GENERIC
Short display name, such as "ET".
virtual UBool operator==(const TimeZoneNames &other) const =0
Return true if the given TimeZoneNames objects are semantically equal.
TimeZoneNames is an abstract class representing the time zone display name data model defined by UTS#...
double UDate
Date and Time data type.
@ UTZNM_SHORT_STANDARD
Short display name for standard time, such as "EST".
UTimeZoneNameType
Constants for time zone display name types.
@ UTZNM_LONG_GENERIC
Long display name, such as "Eastern Time".
void addMetaZone(UTimeZoneNameType nameType, int32_t matchLength, const UnicodeString &mzID, UErrorCode &status)
Adds a meata zone match.
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.
MatchInfoCollection represents a collection of time zone name matches used by TimeZoneNames#find.
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
A Locale object represents a specific geographical, political, or cultural region.
UTimeZoneNameType getNameTypeAt(int32_t idx) const
Returns the time zone name type of a match at the specified index.
virtual StringEnumeration * getAvailableMetaZoneIDs(UErrorCode &status) const =0
Returns an enumeration of all available meta zone IDs.
virtual UnicodeString & getTimeZoneDisplayName(const UnicodeString &tzID, UTimeZoneNameType type, UnicodeString &name) const =0
Returns the display name of the time zone.