ICU 71.1 71.1

tzfmt.h
Go to the documentation of this file.
1 // © 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
3 /*
4 *******************************************************************************
5 * Copyright (C) 2011-2015, International Business Machines Corporation and
6 * others. All Rights Reserved.
7 *******************************************************************************
8 */
9 #ifndef __TZFMT_H
10 #define __TZFMT_H
11
17 #include "unicode/utypes.h"
18
19 #if U_SHOW_CPLUSPLUS_API
20
21 #if !UCONFIG_NO_FORMATTING
22
23 #include "unicode/format.h"
24 #include "unicode/timezone.h"
25 #include "unicode/tznames.h"
26
27 U_CDECL_BEGIN
33 typedef enum UTimeZoneFormatStyle {
38 UTZFMT_STYLE_GENERIC_LOCATION,
43 UTZFMT_STYLE_GENERIC_LONG,
48 UTZFMT_STYLE_GENERIC_SHORT,
53 UTZFMT_STYLE_SPECIFIC_LONG,
58 UTZFMT_STYLE_SPECIFIC_SHORT,
63 UTZFMT_STYLE_LOCALIZED_GMT,
69 UTZFMT_STYLE_LOCALIZED_GMT_SHORT,
76 UTZFMT_STYLE_ISO_BASIC_SHORT,
83 UTZFMT_STYLE_ISO_BASIC_LOCAL_SHORT,
90 UTZFMT_STYLE_ISO_BASIC_FIXED,
97 UTZFMT_STYLE_ISO_BASIC_LOCAL_FIXED,
104 UTZFMT_STYLE_ISO_BASIC_FULL,
111 UTZFMT_STYLE_ISO_BASIC_LOCAL_FULL,
118 UTZFMT_STYLE_ISO_EXTENDED_FIXED,
125 UTZFMT_STYLE_ISO_EXTENDED_LOCAL_FIXED,
132 UTZFMT_STYLE_ISO_EXTENDED_FULL,
139 UTZFMT_STYLE_ISO_EXTENDED_LOCAL_FULL,
144 UTZFMT_STYLE_ZONE_ID,
149 UTZFMT_STYLE_ZONE_ID_SHORT,
154 UTZFMT_STYLE_EXEMPLAR_LOCATION
155 } UTimeZoneFormatStyle;
156
161 typedef enum UTimeZoneFormatGMTOffsetPatternType {
166 UTZFMT_PAT_POSITIVE_HM,
171 UTZFMT_PAT_POSITIVE_HMS,
176 UTZFMT_PAT_NEGATIVE_HM,
181 UTZFMT_PAT_NEGATIVE_HMS,
186 UTZFMT_PAT_POSITIVE_H,
191 UTZFMT_PAT_NEGATIVE_H,
192
193 /* The following cannot be #ifndef U_HIDE_INTERNAL_API, needed for other .h declarations */
198 UTZFMT_PAT_COUNT = 6
199 } UTimeZoneFormatGMTOffsetPatternType;
200
206 typedef enum UTimeZoneFormatTimeType {
211 UTZFMT_TIME_TYPE_UNKNOWN,
216 UTZFMT_TIME_TYPE_STANDARD,
221 UTZFMT_TIME_TYPE_DAYLIGHT
222 } UTimeZoneFormatTimeType;
223
228 typedef enum UTimeZoneFormatParseOption {
233 UTZFMT_PARSE_OPTION_NONE = 0x00,
240 UTZFMT_PARSE_OPTION_ALL_STYLES = 0x01,
248 UTZFMT_PARSE_OPTION_TZ_DATABASE_ABBREVIATIONS = 0x02
249 } UTimeZoneFormatParseOption;
250
251 U_CDECL_END
252
253 U_NAMESPACE_BEGIN
254
255 class TimeZoneGenericNames;
256 class TZDBTimeZoneNames;
257 class UVector;
258
274 class U_I18N_API TimeZoneFormat : public Format {
275 public:
280 TimeZoneFormat(const TimeZoneFormat& other);
281
286 virtual ~TimeZoneFormat();
287
292 TimeZoneFormat& operator=(const TimeZoneFormat& other);
293
302 virtual bool operator==(const Format& other) const override;
303
310 virtual TimeZoneFormat* clone() const override;
311
320 static TimeZoneFormat* U_EXPORT2 createInstance(const Locale& locale, UErrorCode& status);
321
327 const TimeZoneNames* getTimeZoneNames() const;
328
336 void adoptTimeZoneNames(TimeZoneNames *tznames);
337
343 void setTimeZoneNames(const TimeZoneNames &tznames);
344
352 UnicodeString& getGMTPattern(UnicodeString& pattern) const;
353
362 void setGMTPattern(const UnicodeString& pattern, UErrorCode& status);
363
372 UnicodeString& getGMTOffsetPattern(UTimeZoneFormatGMTOffsetPatternType type, UnicodeString& pattern) const;
373
382 void setGMTOffsetPattern(UTimeZoneFormatGMTOffsetPatternType type, const UnicodeString& pattern, UErrorCode& status);
383
393 UnicodeString& getGMTOffsetDigits(UnicodeString& digits) const;
394
407 void setGMTOffsetDigits(const UnicodeString& digits, UErrorCode& status);
408
416 UnicodeString& getGMTZeroFormat(UnicodeString& gmtZeroFormat) const;
417
425 void setGMTZeroFormat(const UnicodeString& gmtZeroFormat, UErrorCode& status);
426
434 uint32_t getDefaultParseOptions(void) const;
435
444 void setDefaultParseOptions(uint32_t flags);
445
461 UnicodeString& formatOffsetISO8601Basic(int32_t offset, UBool useUtcIndicator, UBool isShort, UBool ignoreSeconds,
462 UnicodeString& result, UErrorCode& status) const;
463
479 UnicodeString& formatOffsetISO8601Extended(int32_t offset, UBool useUtcIndicator, UBool isShort, UBool ignoreSeconds,
480 UnicodeString& result, UErrorCode& status) const;
481
501 UnicodeString& formatOffsetLocalizedGMT(int32_t offset, UnicodeString& result, UErrorCode& status) const;
502
522 UnicodeString& formatOffsetShortLocalizedGMT(int32_t offset, UnicodeString& result, UErrorCode& status) const;
523
524 using Format::format;
525
539 virtual UnicodeString& format(UTimeZoneFormatStyle style, const TimeZone& tz, UDate date,
540 UnicodeString& name, UTimeZoneFormatTimeType* timeType = NULL) const;
541
556 int32_t parseOffsetISO8601(const UnicodeString& text, ParsePosition& pos) const;
557
570 int32_t parseOffsetLocalizedGMT(const UnicodeString& text, ParsePosition& pos) const;
571
584 int32_t parseOffsetShortLocalizedGMT(const UnicodeString& text, ParsePosition& pos) const;
585
602 virtual TimeZone* parse(UTimeZoneFormatStyle style, const UnicodeString& text, ParsePosition& pos,
603 int32_t parseOptions, UTimeZoneFormatTimeType* timeType = NULL) const;
604
620 TimeZone* parse(UTimeZoneFormatStyle style, const UnicodeString& text, ParsePosition& pos,
621 UTimeZoneFormatTimeType* timeType = NULL) const;
622
623 /* ----------------------------------------------
624 * Format APIs
625 * ---------------------------------------------- */
626
638 virtual UnicodeString& format(const Formattable& obj, UnicodeString& appendTo,
639 FieldPosition& pos, UErrorCode& status) const override;
640
653 virtual void parseObject(const UnicodeString& source, Formattable& result, ParsePosition& parse_pos) const override;
654
659 static UClassID U_EXPORT2 getStaticClassID(void);
660
665 virtual UClassID getDynamicClassID() const override;
666
667 protected:
674 TimeZoneFormat(const Locale& locale, UErrorCode& status);
675
676 private:
677 /* Locale of this object */
678 Locale fLocale;
679
680 /* Stores the region (could be implicit default) */
681 char fTargetRegion[ULOC_COUNTRY_CAPACITY];
682
683 /* TimeZoneNames object used by this formatter */
684 TimeZoneNames* fTimeZoneNames;
685
686 /* TimeZoneGenericNames object used by this formatter - lazily instantiated */
687 TimeZoneGenericNames* fTimeZoneGenericNames;
688
689 /* Localized GMT format pattern - e.g. "GMT{0}" */
690 UnicodeString fGMTPattern;
691
692 /* Array of offset patterns used by Localized GMT format - e.g. "+HH:mm" */
693 UnicodeString fGMTOffsetPatterns[UTZFMT_PAT_COUNT];
694
695 /* Localized decimal digits used by Localized GMT format */
696 UChar32 fGMTOffsetDigits[10];
697
698 /* Localized GMT zero format - e.g. "GMT" */
699 UnicodeString fGMTZeroFormat;
700
701 /* Bit flags representing parse options */
702 uint32_t fDefParseOptionFlags;
703
704 /* Constant parts of GMT format pattern, populated from localized GMT format pattern*/
705 UnicodeString fGMTPatternPrefix; /* Substring before {0} */
706 UnicodeString fGMTPatternSuffix; /* Substring after {0} */
707
708 /* Compiled offset patterns generated from fGMTOffsetPatterns[] */
709 UVector* fGMTOffsetPatternItems[UTZFMT_PAT_COUNT];
710
711 UBool fAbuttingOffsetHoursAndMinutes;
712
713 /* TZDBTimeZoneNames object used for parsing */
714 TZDBTimeZoneNames* fTZDBTimeZoneNames;
715
726 UnicodeString& formatSpecific(const TimeZone& tz, UTimeZoneNameType stdType, UTimeZoneNameType dstType,
727 UDate date, UnicodeString& name, UTimeZoneFormatTimeType *timeType) const;
728
737 UnicodeString& formatGeneric(const TimeZone& tz, int32_t genType, UDate date, UnicodeString& name) const;
738
744 const TimeZoneGenericNames* getTimeZoneGenericNames(UErrorCode& status) const;
745
751 const TZDBTimeZoneNames* getTZDBTimeZoneNames(UErrorCode& status) const;
752
760 UnicodeString& formatExemplarLocation(const TimeZone& tz, UnicodeString& name) const;
761
765 enum OffsetFields {
766 FIELDS_H,
767 FIELDS_HM,
768 FIELDS_HMS
769 };
770
778 void initGMTPattern(const UnicodeString& gmtPattern, UErrorCode& status);
779
788 static UVector* parseOffsetPattern(const UnicodeString& pattern, OffsetFields required, UErrorCode& status);
789
798 static UnicodeString& expandOffsetPattern(const UnicodeString& offsetHM, UnicodeString& result, UErrorCode& status);
799
808 static UnicodeString& truncateOffsetPattern(const UnicodeString& offsetHM, UnicodeString& result, UErrorCode& status);
809
820 static UBool toCodePoints(const UnicodeString& str, UChar32* codeArray, int32_t capacity);
821
832 UnicodeString& formatOffsetISO8601(int32_t offset, UBool isBasic, UBool useUtcIndicator,
833 UBool isShort, UBool ignoreSeconds, UnicodeString& result, UErrorCode& status) const;
834
842 UnicodeString& formatOffsetLocalizedGMT(int32_t offset, UBool isShort, UnicodeString& result, UErrorCode& status) const;
843
858 int32_t parseOffsetISO8601(const UnicodeString& text, ParsePosition& pos, UBool extendedOnly,
859 UBool* hasDigitOffset = NULL) const;
860
868 void appendOffsetDigits(UnicodeString& buf, int32_t n, uint8_t minDigits) const;
869
882 int32_t parseOffsetLocalizedGMT(const UnicodeString& text, ParsePosition& pos,
883 UBool isShort, UBool* hasDigitOffset) const;
884
894 int32_t parseOffsetLocalizedGMTPattern(const UnicodeString& text, int32_t start,
895 UBool isShort, int32_t& parsedLen) const;
896
905 int32_t parseOffsetFields(const UnicodeString& text, int32_t start, UBool isShort, int32_t& parsedLen) const;
906
918 int32_t parseOffsetFieldsWithPattern(const UnicodeString& text, int32_t start,
919 UVector* patternItems, UBool forceSingleHourDigit, int32_t& hour, int32_t& min, int32_t& sec) const;
920
928 int32_t parseAbuttingOffsetFields(const UnicodeString& text, int32_t start, int32_t& parsedLen) const;
929
937 int32_t parseOffsetDefaultLocalizedGMT(const UnicodeString& text, int start, int32_t& parsedLen) const;
938
947 int32_t parseDefaultOffsetFields(const UnicodeString& text, int32_t start, char16_t separator,
948 int32_t& parsedLen) const;
949
964 int32_t parseOffsetFieldWithLocalizedDigits(const UnicodeString& text, int32_t start,
965 uint8_t minDigits, uint8_t maxDigits, uint16_t minVal, uint16_t maxVal, int32_t& parsedLen) const;
966
976 int32_t parseSingleLocalizedDigit(const UnicodeString& text, int32_t start, int32_t& len) const;
977
987 static UnicodeString& formatOffsetWithAsciiDigits(int32_t offset, char16_t sep,
988 OffsetFields minFields, OffsetFields maxFields, UnicodeString& result);
989
1002 static int32_t parseAbuttingAsciiOffsetFields(const UnicodeString& text, ParsePosition& pos,
1003 OffsetFields minFields, OffsetFields maxFields, UBool fixedHourWidth);
1004
1017 static int32_t parseAsciiOffsetFields(const UnicodeString& text, ParsePosition& pos, char16_t sep,
1018 OffsetFields minFields, OffsetFields maxFields);
1019
1026 static UnicodeString& unquote(const UnicodeString& pattern, UnicodeString& result);
1027
1033 void initGMTOffsetPatterns(UErrorCode& status);
1034
1041 void checkAbuttingHoursAndMinutes();
1042
1048 TimeZone* createTimeZoneForOffset(int32_t offset) const;
1049
1055 static UTimeZoneFormatTimeType getTimeType(UTimeZoneNameType nameType);
1056
1065 UnicodeString& getTimeZoneID(const TimeZoneNames::MatchInfoCollection* matches, int32_t idx, UnicodeString& tzID) const;
1066
1067
1075 UnicodeString& parseZoneID(const UnicodeString& text, ParsePosition& pos, UnicodeString& tzID) const;
1076
1084 UnicodeString& parseShortZoneID(const UnicodeString& text, ParsePosition& pos, UnicodeString& tzID) const;
1085
1093 UnicodeString& parseExemplarLocation(const UnicodeString& text, ParsePosition& pos, UnicodeString& tzID) const;
1094 };
1095
1096 U_NAMESPACE_END
1097
1098 #endif /* !UCONFIG_NO_FORMATTING */
1099
1100 #endif /* U_SHOW_CPLUSPLUS_API */
1101
1102 #endif
icu::FieldPosition
FieldPosition is a simple class used by Format and its subclasses to identify fields in formatted out...
Definition: fieldpos.h:110
UTZFMT_STYLE_ZONE_ID_SHORT
@ UTZFMT_STYLE_ZONE_ID_SHORT
Short Time Zone ID (BCP 47 Unicode location extension, time zone type value), such as "uslax".
Definition: tzfmt.h:149
utypes.h
Basic definitions for ICU, for both C and C++ APIs.
tznames.h
C++ API: TimeZoneNames.
UTZFMT_STYLE_ISO_BASIC_FULL
@ UTZFMT_STYLE_ISO_BASIC_FULL
ISO 8601 local time difference (basic format) with optional seconds field, or the UTC indicator.
Definition: tzfmt.h:104
U_I18N_API
#define U_I18N_API
Definition: utypes.h:301
UTZFMT_STYLE_ISO_BASIC_SHORT
@ UTZFMT_STYLE_ISO_BASIC_SHORT
Short ISO 8601 local time difference (basic format) or the UTC indicator.
Definition: tzfmt.h:76
UBool
int8_t UBool
The ICU boolean type, a signed-byte integer.
Definition: umachine.h:269
icu::Format::parseObject
virtual void parseObject(const UnicodeString &source, Formattable &result, ParsePosition &parse_pos) const =0
Parse a string to produce an object.
icu::Formattable
Formattable objects can be passed to the Format class or its subclasses for formatting.
Definition: fmtable.h:64
format.h
C++ API: Base class for all formats.
UTZFMT_STYLE_GENERIC_LONG
@ UTZFMT_STYLE_GENERIC_LONG
Generic long non-location format, such as "Eastern Time".
Definition: tzfmt.h:43
UTZFMT_STYLE_EXEMPLAR_LOCATION
@ UTZFMT_STYLE_EXEMPLAR_LOCATION
Exemplar location, such as "Los Angeles" and "Paris".
Definition: tzfmt.h:154
UTZFMT_PAT_COUNT
@ UTZFMT_PAT_COUNT
Number of UTimeZoneFormatGMTOffsetPatternType types.
Definition: tzfmt.h:198
icu::Format::format
UnicodeString & format(const Formattable &obj, UnicodeString &appendTo, UErrorCode &status) const
Formats an object to produce a string.
UTZFMT_STYLE_SPECIFIC_LONG
@ UTZFMT_STYLE_SPECIFIC_LONG
Specific long format, such as "Eastern Standard Time".
Definition: tzfmt.h:53
icu::TimeZone
TimeZone represents a time zone offset, and also figures out daylight savings.
Definition: timezone.h:133
NULL
#define NULL
Definition: utypes.h:188
UTZFMT_PAT_POSITIVE_HM
@ UTZFMT_PAT_POSITIVE_HM
Positive offset with hours and minutes fields.
Definition: tzfmt.h:166
UTZFMT_PAT_POSITIVE_HMS
@ UTZFMT_PAT_POSITIVE_HMS
Positive offset with hours, minutes and seconds fields.
Definition: tzfmt.h:171
UTZFMT_TIME_TYPE_DAYLIGHT
@ UTZFMT_TIME_TYPE_DAYLIGHT
Daylight saving time.
Definition: tzfmt.h:221
UTimeZoneFormatGMTOffsetPatternType
UTimeZoneFormatGMTOffsetPatternType
Constants for GMT offset pattern types.
Definition: tzfmt.h:161
UTZFMT_STYLE_ISO_BASIC_LOCAL_FULL
@ UTZFMT_STYLE_ISO_BASIC_LOCAL_FULL
ISO 8601 local time difference (basic format) with optional seconds field.
Definition: tzfmt.h:111
icu::Format
Base class for all formats.
Definition: format.h:98
icu::UnicodeString
UnicodeString is a string class that stores Unicode characters directly and provides similar function...
Definition: unistr.h:295
UTZFMT_STYLE_ZONE_ID
@ UTZFMT_STYLE_ZONE_ID
Time Zone ID, such as "America/Los_Angeles".
Definition: tzfmt.h:144
timezone.h
C++ API: TimeZone object.
icu::Format::operator=
Format & operator=(const Format &)
UChar32
int32_t UChar32
Define UChar32 as a type for single Unicode code points.
Definition: umachine.h:467
icu::Format::clone
virtual Format * clone() const =0
Clone this object polymorphically.
UTZFMT_STYLE_ISO_EXTENDED_FIXED
@ UTZFMT_STYLE_ISO_EXTENDED_FIXED
Fixed width ISO 8601 local time difference (extended format) or the UTC indicator.
Definition: tzfmt.h:118
UClassID
void * UClassID
UClassID is used to identify classes without using the compiler's RTTI.
Definition: uobject.h:96
UErrorCode
UErrorCode
Standard ICU4C error code type, a substitute for exceptions.
Definition: utypes.h:415
UTZFMT_PAT_NEGATIVE_HM
@ UTZFMT_PAT_NEGATIVE_HM
Negative offset with hours and minutes fields.
Definition: tzfmt.h:176
icu::UObject::getDynamicClassID
virtual UClassID getDynamicClassID() const
ICU4C "poor man's RTTI", returns a UClassID for the actual ICU class.
UTZFMT_TIME_TYPE_UNKNOWN
@ UTZFMT_TIME_TYPE_UNKNOWN
Unknown.
Definition: tzfmt.h:211
UTimeZoneFormatTimeType
UTimeZoneFormatTimeType
Constants for time types used by TimeZoneFormat APIs for receiving time type (standard time,...
Definition: tzfmt.h:206
UTZFMT_PAT_NEGATIVE_HMS
@ UTZFMT_PAT_NEGATIVE_HMS
Negative offset with hours, minutes and seconds fields.
Definition: tzfmt.h:181
UTimeZoneFormatStyle
UTimeZoneFormatStyle
Constants for time zone display format style used by format/parse APIs in TimeZoneFormat.
Definition: tzfmt.h:33
U_CDECL_END
#define U_CDECL_END
Definition: umachine.h:86
U_CDECL_BEGIN
#define U_CDECL_BEGIN
Definition: umachine.h:85
UTZFMT_STYLE_GENERIC_LOCATION
@ UTZFMT_STYLE_GENERIC_LOCATION
Generic location format, such as "United States Time (New York)", "Italy Time".
Definition: tzfmt.h:38
UTZFMT_STYLE_SPECIFIC_SHORT
@ UTZFMT_STYLE_SPECIFIC_SHORT
Specific short format, such as "EST", "PDT".
Definition: tzfmt.h:58
UTZFMT_STYLE_ISO_EXTENDED_LOCAL_FULL
@ UTZFMT_STYLE_ISO_EXTENDED_LOCAL_FULL
ISO 8601 local time difference (extended format) with optional seconds field.
Definition: tzfmt.h:139
UTZFMT_STYLE_LOCALIZED_GMT
@ UTZFMT_STYLE_LOCALIZED_GMT
Localized GMT offset format, such as "GMT-05:00", "UTC+0100".
Definition: tzfmt.h:63
icu::TimeZoneNames
TimeZoneNames is an abstract class representing the time zone display name data model defined by UTS#...
Definition: tznames.h:131
UTZFMT_STYLE_ISO_EXTENDED_LOCAL_FIXED
@ UTZFMT_STYLE_ISO_EXTENDED_LOCAL_FIXED
Fixed width ISO 8601 local time difference (extended format).
Definition: tzfmt.h:125
UTZFMT_STYLE_ISO_EXTENDED_FULL
@ UTZFMT_STYLE_ISO_EXTENDED_FULL
ISO 8601 local time difference (extended format) with optional seconds field, or the UTC indicator.
Definition: tzfmt.h:132
UDate
double UDate
Date and Time data type.
Definition: utypes.h:203
UTZFMT_STYLE_GENERIC_SHORT
@ UTZFMT_STYLE_GENERIC_SHORT
Generic short non-location format, such as "ET".
Definition: tzfmt.h:48
UTimeZoneNameType
UTimeZoneNameType
Constants for time zone display name types.
Definition: tznames.h:31
UTZFMT_STYLE_ISO_BASIC_LOCAL_SHORT
@ UTZFMT_STYLE_ISO_BASIC_LOCAL_SHORT
Short ISO 8601 locale time difference (basic format).
Definition: tzfmt.h:83
UTZFMT_TIME_TYPE_STANDARD
@ UTZFMT_TIME_TYPE_STANDARD
Standard time.
Definition: tzfmt.h:216
UTZFMT_STYLE_ISO_BASIC_FIXED
@ UTZFMT_STYLE_ISO_BASIC_FIXED
Fixed width ISO 8601 local time difference (basic format) or the UTC indicator.
Definition: tzfmt.h:90
UTZFMT_PARSE_OPTION_TZ_DATABASE_ABBREVIATIONS
@ UTZFMT_PARSE_OPTION_TZ_DATABASE_ABBREVIATIONS
When parsing a time zone display name in UTZFMT_STYLE_SPECIFIC_SHORT, look for the IANA tz database c...
Definition: tzfmt.h:248
UTZFMT_PARSE_OPTION_NONE
@ UTZFMT_PARSE_OPTION_NONE
No option.
Definition: tzfmt.h:233
UTZFMT_PAT_NEGATIVE_H
@ UTZFMT_PAT_NEGATIVE_H
Negative offset with hours field.
Definition: tzfmt.h:191
icu::TimeZoneNames::MatchInfoCollection
MatchInfoCollection represents a collection of time zone name matches used by TimeZoneNames#find.
Definition: tznames.h:310
UTZFMT_PAT_POSITIVE_H
@ UTZFMT_PAT_POSITIVE_H
Positive offset with hours field.
Definition: tzfmt.h:186
UTZFMT_STYLE_ISO_BASIC_LOCAL_FIXED
@ UTZFMT_STYLE_ISO_BASIC_LOCAL_FIXED
Fixed width ISO 8601 local time difference (basic format).
Definition: tzfmt.h:97
icu::ParsePosition
ParsePosition is a simple class used by Format and its subclasses to keep track of the current positi...
Definition: parsepos.h:52
UTZFMT_STYLE_LOCALIZED_GMT_SHORT
@ UTZFMT_STYLE_LOCALIZED_GMT_SHORT
Short localized GMT offset format, such as "GMT-5", "UTC+1:30" This style is equivalent to the LDML d...
Definition: tzfmt.h:69
icu::Locale
A Locale object represents a specific geographical, political, or cultural region.
Definition: locid.h:195
UTimeZoneFormatParseOption
UTimeZoneFormatParseOption
Constants for parse option flags, used for specifying optional parse behavior.
Definition: tzfmt.h:228
ULOC_COUNTRY_CAPACITY
#define ULOC_COUNTRY_CAPACITY
Useful constant for the maximum size of the country part of a locale ID (including the terminating NU...
Definition: uloc.h:258
UTZFMT_PARSE_OPTION_ALL_STYLES
@ UTZFMT_PARSE_OPTION_ALL_STYLES
When a time zone display name is not found within a set of display names used for the specified style...
Definition: tzfmt.h:240
icu::TimeZoneFormat
TimeZoneFormat supports time zone display name formatting and parsing.
Definition: tzfmt.h:274
icu::Format::operator==
virtual bool operator==(const Format &other) const =0
Return true if the given Format objects are semantically equal.