StringEnumeration;
199 constint32_t* rawOffset,
202 #ifndef U_HIDE_DEPRECATED_API 223 #ifndef U_HIDE_DEPRECATED_API 264 #ifndef U_HIDE_DEPRECATED_API 369 #ifndef U_HIDE_INTERNAL_API 393 #ifndef U_HIDE_SYSTEM_API 576 virtualint32_t
getOffset(uint8_t era, int32_t year, int32_t month, int32_t day,
577uint8_t dayOfWeek, int32_t millis,
UErrorCode& status)
const= 0;
599 virtualint32_t
getOffset(uint8_t era, int32_t year, int32_t month, int32_t day,
600uint8_t dayOfWeek, int32_t milliseconds,
601int32_t monthLength,
UErrorCode& status)
const= 0;
816 #ifndef U_FORCE_HIDE_DEPRECATED_API 908 char*region, int32_t capacity,
UErrorCode& status);
939 #ifndef U_HIDE_INTERNAL_API 953 friend classZoneMeta;
976 static constchar16_t* dereferOlsonLink(
const UnicodeString&
id);
984 static constchar16_t* getRegion(
const UnicodeString&
id);
987 #ifndef U_HIDE_INTERNAL_API 1011int32_t& minute, int32_t& second);
1035 static UnicodeString& formatCustomID(int32_t hour, int32_t min, int32_t sec,
1040 friend classTZEnumeration;
A Locale object represents a specific geographical, political, or cultural region.
Base class for 'pure' C++ implementations of uenum api.
TimeZone represents a time zone offset, and also figures out daylight savings.
static UClassID getStaticClassID()
Return the class ID for this class.
EDisplayType
Enum for use with getDisplayName.
@ SHORT_COMMONLY_USED
Selector for short display name derived from the time zone's fallback name.
@ LONG_GMT
Selector for long display name derived from time zone offset.
@ SHORT_GENERIC
Selector for short generic display name.
@ LONG
Selector for long display name.
@ SHORT_GMT
Selector for short display name derived from time zone offset.
@ LONG_GENERIC
Selector for long generic display name.
static UnicodeString & getIDForWindowsID(const UnicodeString &winid, const char *region, UnicodeString &id, UErrorCode &status)
Converts a Windows time zone ID to an equivalent system time zone ID for a region.
static int32_t getRegion(const UnicodeString &id, char *region, int32_t capacity, UErrorCode &status)
Gets the region code associated with the given system time zone ID.
virtual UClassID getDynamicClassID() const override=0
Returns a unique class ID POLYMORPHICALLY.
virtual void setRawOffset(int32_t offsetMillis)=0
Sets the TimeZone's raw GMT offset (i.e., the number of milliseconds to add to GMT to get local time,...
virtual TimeZone * clone() const =0
Clones TimeZone objects polymorphically.
static void setDefault(const TimeZone &zone)
Same as adoptDefault(), except that the TimeZone object passed in is NOT adopted; the caller remains ...
virtual bool operator==(const TimeZone &that) const
Returns true if the two TimeZones are equal.
static UnicodeString & getWindowsID(const UnicodeString &id, UnicodeString &winid, UErrorCode &status)
Converts a system time zone ID to an equivalent Windows time zone ID.
static StringEnumeration * createEnumerationForRawOffset(int32_t rawOffset, UErrorCode &status)
Returns an enumeration over time zone IDs with a given raw offset from GMT.
UnicodeString & getDisplayName(UBool inDaylight, EDisplayType style, UnicodeString &result) const
Returns a name of this time zone suitable for presentation to the user in the default locale.
static TimeZone * createTimeZone(const UnicodeString &ID)
Creates a TimeZone for the given ID.
virtual UBool useDaylightTime() const =0
Queries if this time zone uses daylight savings time.
UnicodeString & getDisplayName(const Locale &locale, UnicodeString &result) const
Returns a name of this time zone suitable for presentation to the user in the specified locale.
TimeZone(const TimeZone &source)
Copy constructor.
static const char * getTZDataVersion(UErrorCode &status)
Returns the timezone data version currently used by ICU.
virtual int32_t getOffset(uint8_t era, int32_t year, int32_t month, int32_t day, uint8_t dayOfWeek, int32_t millis, UErrorCode &status) const =0
Returns the TimeZone's adjusted GMT offset (i.e., the number of milliseconds to add to GMT to get loc...
static TimeZone * detectHostTimeZone()
Creates an instance of TimeZone detected from the current host system configuration.
TimeZone(const UnicodeString &id)
Construct a TimeZone with a given ID.
static UResourceBundle * loadRule(const UResourceBundle *top, const UnicodeString &ruleid, UResourceBundle *oldbundle, UErrorCode &status)
Utility function.
static StringEnumeration * createTimeZoneIDEnumeration(USystemTimeZoneType zoneType, const char *region, const int32_t *rawOffset, UErrorCode &ec)
Returns an enumeration over system time zone IDs with the given filter conditions.
TimeZone & operator=(const TimeZone &right)
Default assignment operator.
UnicodeString & getDisplayName(UnicodeString &result) const
Returns a name of this time zone suitable for presentation to the user in the default locale.
static UnicodeString getEquivalentID(const UnicodeString &id, int32_t index)
Returns an ID in the equivalency group that includes the given ID.
static TimeZone * forLocaleOrDefault(const Locale &locale)
If the locale contains the timezone keyword, creates a copy of that TimeZone.
static const char16_t * getRegion(const UnicodeString &id, UErrorCode &status)
Returns the region code associated with the given zone, or nullptr if the zone is not known.
virtual UBool hasSameRules(const TimeZone &other) const
Returns true if this zone has the same rule and offset as another zone.
UnicodeString & getDisplayName(UBool inDaylight, EDisplayType style, const Locale &locale, UnicodeString &result) const
Returns a name of this time zone suitable for presentation to the user in the specified locale.
static int32_t countEquivalentIDs(const UnicodeString &id)
Returns the number of IDs in the equivalency group that includes the given ID.
static void adoptDefault(TimeZone *zone)
Sets the default time zone (i.e., what's returned by createDefault()) to be the specified time zone.
TimeZone()
Default constructor.
static UnicodeString & getCanonicalID(const UnicodeString &id, UnicodeString &canonicalID, UErrorCode &status)
Returns the canonical system timezone ID or the normalized custom time zone ID for the given time zon...
static StringEnumeration * createEnumeration(UErrorCode &status)
Returns an enumeration over all recognized time zone IDs.
static StringEnumeration * createEnumeration(int32_t rawOffset)
Returns an enumeration over time zone IDs with a given raw offset from GMT.
bool operator!=(const TimeZone &that) const
Returns true if the two TimeZones are NOT equal; that is, if operator==() returns false.
virtual int32_t getOffset(uint8_t era, int32_t year, int32_t month, int32_t day, uint8_t dayOfWeek, int32_t milliseconds, int32_t monthLength, UErrorCode &status) const =0
Gets the time zone offset, for current date, modified in case of daylight savings.
static StringEnumeration * createEnumeration(const char *region)
Returns an enumeration over time zone IDs associated with the given region.
static StringEnumeration * createEnumeration()
Returns an enumeration over all recognized time zone IDs.
static UnicodeString & getIanaID(const UnicodeString &id, UnicodeString &ianaID, UErrorCode &status)
Returns the preferred time zone ID in the IANA time zone database for the given time zone ID.
virtual int32_t getRawOffset() const =0
Returns the TimeZone's raw GMT offset (i.e., the number of milliseconds to add to GMT to get local ti...
static UnicodeString & getCanonicalID(const UnicodeString &id, UnicodeString &canonicalID, UBool &isSystemID, UErrorCode &status)
Returns the canonical system time zone ID or the normalized custom time zone ID for the given time zo...
virtual UBool inDaylightTime(UDate date, UErrorCode &status) const =0
Queries if the given date is in daylight savings time in this time zone.
static const TimeZone & getUnknown()
Returns the "unknown" time zone.
static StringEnumeration * createEnumerationForRegion(const char *region, UErrorCode &status)
Returns an enumeration over time zone IDs associated with the given region.
static const TimeZone * getGMT()
The GMT (=UTC) time zone has a raw offset of zero and does not use daylight savings time.
virtual int32_t getDSTSavings() const
Returns the amount of time to be added to local standard time to get local wall clock time.
virtual void getOffset(UDate date, UBool local, int32_t &rawOffset, int32_t &dstOffset, UErrorCode &ec) const
Returns the time zone raw and GMT offset for the given moment in time.
static TimeZone * createDefault()
Creates a new copy of the default TimeZone for this host.
UObject is the common ICU "boilerplate" class.
UnicodeString is a string class that stores Unicode characters directly and provides similar function...
U_EXPORT UBool operator==(const StringPiece &x, const StringPiece &y)
Global operator == for StringPiece.
USystemTimeZoneType
System time zone type constants used by filtering zones in ucal_openTimeZoneIDEnumeration.
int8_t UBool
The ICU boolean type, a signed-byte integer.
C++ API: Common ICU base class UObject.
void * UClassID
UClassID is used to identify classes without using the compiler's RTTI.
struct UResourceBundle UResourceBundle
Basic definitions for ICU, for both C and C++ APIs.
UErrorCode
Standard ICU4C error code type, a substitute for exceptions.
#define U_I18N_API
Set to export library symbols from inside the i18n library, and to import them from outside.
double UDate
Date and Time data type.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4