Loading...
Searching...
No Matches
tzfmt.h
Go to the documentation of this file.
// © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/*
*******************************************************************************
* Copyright (C) 2011-2015, International Business Machines Corporation and
* others. All Rights Reserved.
*******************************************************************************
*/
#ifndef __TZFMT_H
#define __TZFMT_H
#include "unicode/utypes.h"
#if U_SHOW_CPLUSPLUS_API
#if !UCONFIG_NO_FORMATTING
#include "unicode/format.h"
#include "unicode/timezone.h"
#include "unicode/tznames.h"
U_CDECL_BEGIN
typedef enum UTimeZoneFormatStyle {
UTZFMT_STYLE_GENERIC_LOCATION,
UTZFMT_STYLE_GENERIC_LONG,
UTZFMT_STYLE_GENERIC_SHORT,
UTZFMT_STYLE_SPECIFIC_LONG,
UTZFMT_STYLE_SPECIFIC_SHORT,
UTZFMT_STYLE_LOCALIZED_GMT,
UTZFMT_STYLE_LOCALIZED_GMT_SHORT,
UTZFMT_STYLE_ISO_BASIC_SHORT,
UTZFMT_STYLE_ISO_BASIC_LOCAL_SHORT,
UTZFMT_STYLE_ISO_BASIC_FIXED,
UTZFMT_STYLE_ISO_BASIC_LOCAL_FIXED,
UTZFMT_STYLE_ISO_BASIC_FULL,
UTZFMT_STYLE_ISO_BASIC_LOCAL_FULL,
UTZFMT_STYLE_ISO_EXTENDED_FIXED,
UTZFMT_STYLE_ISO_EXTENDED_LOCAL_FIXED,
UTZFMT_STYLE_ISO_EXTENDED_FULL,
UTZFMT_STYLE_ISO_EXTENDED_LOCAL_FULL,
UTZFMT_STYLE_ZONE_ID,
UTZFMT_STYLE_ZONE_ID_SHORT,
UTZFMT_STYLE_EXEMPLAR_LOCATION
} UTimeZoneFormatStyle;
typedef enum UTimeZoneFormatGMTOffsetPatternType {
UTZFMT_PAT_POSITIVE_HM,
UTZFMT_PAT_POSITIVE_HMS,
UTZFMT_PAT_NEGATIVE_HM,
UTZFMT_PAT_NEGATIVE_HMS,
UTZFMT_PAT_POSITIVE_H,
UTZFMT_PAT_NEGATIVE_H,
/* The following cannot be #ifndef U_HIDE_INTERNAL_API, needed for other .h declarations */
UTZFMT_PAT_COUNT = 6
} UTimeZoneFormatGMTOffsetPatternType;
typedef enum UTimeZoneFormatTimeType {
UTZFMT_TIME_TYPE_UNKNOWN,
UTZFMT_TIME_TYPE_STANDARD,
UTZFMT_TIME_TYPE_DAYLIGHT
} UTimeZoneFormatTimeType;
typedef enum UTimeZoneFormatParseOption {
UTZFMT_PARSE_OPTION_NONE = 0x00,
UTZFMT_PARSE_OPTION_ALL_STYLES = 0x01,
UTZFMT_PARSE_OPTION_TZ_DATABASE_ABBREVIATIONS = 0x02
} UTimeZoneFormatParseOption;
U_CDECL_END
U_NAMESPACE_BEGIN
class TimeZoneGenericNames;
class TZDBTimeZoneNames;
class UVector;
class U_I18N_API_CLASS TimeZoneFormat : public Format {
public:
U_I18N_API TimeZoneFormat(const TimeZoneFormat& other);
U_I18N_API virtual ~TimeZoneFormat();
U_I18N_API TimeZoneFormat& operator=(const TimeZoneFormat& other);
U_I18N_API virtual bool operator==(const Format& other) const override;
U_I18N_API virtual TimeZoneFormat* clone() const override;
U_I18N_API static TimeZoneFormat* U_EXPORT2 createInstance(const Locale& locale, UErrorCode& status);
U_I18N_API const TimeZoneNames* getTimeZoneNames() const;
U_I18N_API void adoptTimeZoneNames(TimeZoneNames* tznames);
U_I18N_API void setTimeZoneNames(const TimeZoneNames& tznames);
U_I18N_API UnicodeString& getGMTPattern(UnicodeString& pattern) const;
U_I18N_API void setGMTPattern(const UnicodeString& pattern, UErrorCode& status);
U_I18N_API UnicodeString& getGMTOffsetPattern(UTimeZoneFormatGMTOffsetPatternType type,
UnicodeString& pattern) const;
U_I18N_API void setGMTOffsetPattern(UTimeZoneFormatGMTOffsetPatternType type,
const UnicodeString& pattern, UErrorCode& status);
U_I18N_API UnicodeString& getGMTOffsetDigits(UnicodeString& digits) const;
U_I18N_API void setGMTOffsetDigits(const UnicodeString& digits, UErrorCode& status);
U_I18N_API UnicodeString& getGMTZeroFormat(UnicodeString& gmtZeroFormat) const;
U_I18N_API void setGMTZeroFormat(const UnicodeString& gmtZeroFormat, UErrorCode& status);
U_I18N_API uint32_t getDefaultParseOptions() const;
U_I18N_API void setDefaultParseOptions(uint32_t flags);
U_I18N_API UnicodeString& formatOffsetISO8601Basic(int32_t offset,
UBool useUtcIndicator,
UBool isShort,
UBool ignoreSeconds,
UnicodeString& result,
UErrorCode& status) const;
U_I18N_API UnicodeString& formatOffsetISO8601Extended(int32_t offset,
UBool useUtcIndicator,
UBool isShort,
UBool ignoreSeconds,
UnicodeString& result,
UErrorCode& status) const;
U_I18N_API UnicodeString& formatOffsetLocalizedGMT(int32_t offset,
UnicodeString& result,
UErrorCode& status) const;
U_I18N_API UnicodeString& formatOffsetShortLocalizedGMT(int32_t offset,
UnicodeString& result,
UErrorCode& status) const;
using Format::format;
U_I18N_API virtual UnicodeString& format(UTimeZoneFormatStyle style,
const TimeZone& tz,
UDate date,
UnicodeString& name,
UTimeZoneFormatTimeType* timeType = nullptr) const;
U_I18N_API int32_t parseOffsetISO8601(const UnicodeString& text, ParsePosition& pos) const;
U_I18N_API int32_t parseOffsetLocalizedGMT(const UnicodeString& text, ParsePosition& pos) const;
U_I18N_API int32_t parseOffsetShortLocalizedGMT(const UnicodeString& text, ParsePosition& pos) const;
U_I18N_API virtual TimeZone* parse(UTimeZoneFormatStyle style,
const UnicodeString& text,
ParsePosition& pos,
int32_t parseOptions,
UTimeZoneFormatTimeType* timeType = nullptr) const;
U_I18N_API TimeZone* parse(UTimeZoneFormatStyle style,
const UnicodeString& text,
ParsePosition& pos,
UTimeZoneFormatTimeType* timeType = nullptr) const;
/* ----------------------------------------------
* Format APIs
* ---------------------------------------------- */
U_I18N_API virtual UnicodeString& format(const Formattable& obj,
UnicodeString& appendTo,
FieldPosition& pos,
UErrorCode& status) const override;
U_I18N_API virtual void parseObject(const UnicodeString& source,
Formattable& result,
ParsePosition& parse_pos) const override;
U_I18N_API static UClassID getStaticClassID();
U_I18N_API virtual UClassID getDynamicClassID() const override;
protected:
U_I18N_API TimeZoneFormat(const Locale& locale, UErrorCode& status);
private:
/* Locale of this object */
Locale fLocale;
/* Stores the region (could be implicit default) */
char fTargetRegion[ULOC_COUNTRY_CAPACITY];
/* TimeZoneNames object used by this formatter */
TimeZoneNames* fTimeZoneNames;
/* TimeZoneGenericNames object used by this formatter - lazily instantiated */
TimeZoneGenericNames* fTimeZoneGenericNames;
/* Localized GMT format pattern - e.g. "GMT{0}" */
UnicodeString fGMTPattern;
/* Array of offset patterns used by Localized GMT format - e.g. "+HH:mm" */
UnicodeString fGMTOffsetPatterns[UTZFMT_PAT_COUNT];
/* Localized decimal digits used by Localized GMT format */
UChar32 fGMTOffsetDigits[10];
/* Localized GMT zero format - e.g. "GMT" */
UnicodeString fGMTZeroFormat;
/* Bit flags representing parse options */
uint32_t fDefParseOptionFlags;
/* Constant parts of GMT format pattern, populated from localized GMT format pattern*/
UnicodeString fGMTPatternPrefix; /* Substring before {0} */
UnicodeString fGMTPatternSuffix; /* Substring after {0} */
/* Compiled offset patterns generated from fGMTOffsetPatterns[] */
UVector* fGMTOffsetPatternItems[UTZFMT_PAT_COUNT];
UBool fAbuttingOffsetHoursAndMinutes;
/* TZDBTimeZoneNames object used for parsing */
TZDBTimeZoneNames* fTZDBTimeZoneNames;
UnicodeString& formatSpecific(const TimeZone& tz, UTimeZoneNameType stdType, UTimeZoneNameType dstType,
UDate date, UnicodeString& name, UTimeZoneFormatTimeType *timeType) const;
UnicodeString& formatGeneric(const TimeZone& tz, int32_t genType, UDate date, UnicodeString& name) const;
const TimeZoneGenericNames* getTimeZoneGenericNames(UErrorCode& status) const;
const TZDBTimeZoneNames* getTZDBTimeZoneNames(UErrorCode& status) const;
UnicodeString& formatExemplarLocation(const TimeZone& tz, UnicodeString& name) const;
enum OffsetFields {
FIELDS_H,
FIELDS_HM,
FIELDS_HMS
};
void initGMTPattern(const UnicodeString& gmtPattern, UErrorCode& status);
static UVector* parseOffsetPattern(const UnicodeString& pattern, OffsetFields required, UErrorCode& status);
static UnicodeString& expandOffsetPattern(const UnicodeString& offsetHM, UnicodeString& result, UErrorCode& status);
static UnicodeString& truncateOffsetPattern(const UnicodeString& offsetHM, UnicodeString& result, UErrorCode& status);
static UBool toCodePoints(const UnicodeString& str, UChar32* codeArray, int32_t capacity);
UnicodeString& formatOffsetISO8601(int32_t offset, UBool isBasic, UBool useUtcIndicator,
UBool isShort, UBool ignoreSeconds, UnicodeString& result, UErrorCode& status) const;
UnicodeString& formatOffsetLocalizedGMT(int32_t offset, UBool isShort, UnicodeString& result, UErrorCode& status) const;
int32_t parseOffsetISO8601(const UnicodeString& text, ParsePosition& pos, UBool extendedOnly,
UBool* hasDigitOffset = nullptr) const;
void appendOffsetDigits(UnicodeString& buf, int32_t n, uint8_t minDigits) const;
int32_t parseOffsetLocalizedGMT(const UnicodeString& text, ParsePosition& pos,
UBool isShort, UBool* hasDigitOffset) const;
int32_t parseOffsetLocalizedGMTPattern(const UnicodeString& text, int32_t start,
UBool isShort, int32_t& parsedLen) const;
int32_t parseOffsetFields(const UnicodeString& text, int32_t start, UBool isShort, int32_t& parsedLen) const;
int32_t parseOffsetFieldsWithPattern(const UnicodeString& text, int32_t start,
UVector* patternItems, UBool forceSingleHourDigit, int32_t& hour, int32_t& min, int32_t& sec) const;
int32_t parseAbuttingOffsetFields(const UnicodeString& text, int32_t start, int32_t& parsedLen) const;
int32_t parseOffsetDefaultLocalizedGMT(const UnicodeString& text, int start, int32_t& parsedLen) const;
int32_t parseDefaultOffsetFields(const UnicodeString& text, int32_t start, char16_t separator,
int32_t& parsedLen) const;
int32_t parseOffsetFieldWithLocalizedDigits(const UnicodeString& text, int32_t start,
uint8_t minDigits, uint8_t maxDigits, uint16_t minVal, uint16_t maxVal, int32_t& parsedLen) const;
int32_t parseSingleLocalizedDigit(const UnicodeString& text, int32_t start, int32_t& len) const;
static UnicodeString& formatOffsetWithAsciiDigits(int32_t offset, char16_t sep,
OffsetFields minFields, OffsetFields maxFields, UnicodeString& result);
static int32_t parseAbuttingAsciiOffsetFields(const UnicodeString& text, ParsePosition& pos,
OffsetFields minFields, OffsetFields maxFields, UBool fixedHourWidth);
static int32_t parseAsciiOffsetFields(const UnicodeString& text, ParsePosition& pos, char16_t sep,
OffsetFields minFields, OffsetFields maxFields);
static UnicodeString& unquote(const UnicodeString& pattern, UnicodeString& result);
void initGMTOffsetPatterns(UErrorCode& status);
void checkAbuttingHoursAndMinutes();
TimeZone* createTimeZoneForOffset(int32_t offset) const;
static UTimeZoneFormatTimeType getTimeType(UTimeZoneNameType nameType);
UnicodeString& getTimeZoneID(const TimeZoneNames::MatchInfoCollection* matches, int32_t idx, UnicodeString& tzID) const;
UnicodeString& parseZoneID(const UnicodeString& text, ParsePosition& pos, UnicodeString& tzID) const;
UnicodeString& parseShortZoneID(const UnicodeString& text, ParsePosition& pos, UnicodeString& tzID) const;
UnicodeString& parseExemplarLocation(const UnicodeString& text, ParsePosition& pos, UnicodeString& tzID) const;
};
U_NAMESPACE_END
#endif /* !UCONFIG_NO_FORMATTING */
#endif /* U_SHOW_CPLUSPLUS_API */
#endif
icu::FieldPosition
FieldPosition is a simple class used by Format and its subclasses to identify fields in formatted out...
Definition fieldpos.h:110
icu::Format::Format
U_I18N_API Format()
Default constructor for subclass use only.
icu::Format::format
U_I18N_API UnicodeString & format(const Formattable &obj, UnicodeString &appendTo, UErrorCode &status) const
Formats an object to produce a string.
icu::Formattable
Formattable objects can be passed to the Format class or its subclasses for formatting.
Definition fmtable.h:63
icu::Locale
A Locale object represents a specific geographical, political, or cultural region.
Definition locid.h:198
icu::ParsePosition
ParsePosition is a simple class used by Format and its subclasses to keep track of the current positi...
Definition parsepos.h:52
icu::TimeZoneFormat::getDynamicClassID
virtual U_I18N_API UClassID getDynamicClassID() const override
ICU "poor man's RTTI", returns a UClassID for the actual class.
icu::TimeZoneFormat::getGMTZeroFormat
U_I18N_API UnicodeString & getGMTZeroFormat(UnicodeString &gmtZeroFormat) const
Returns the localized GMT format string for GMT(UTC) itself (GMT offset is 0).
icu::TimeZoneFormat::~TimeZoneFormat
virtual U_I18N_API ~TimeZoneFormat()
Destructor.
icu::TimeZoneFormat::formatOffsetShortLocalizedGMT
U_I18N_API UnicodeString & formatOffsetShortLocalizedGMT(int32_t offset, UnicodeString &result, UErrorCode &status) const
Returns the short localized GMT(UTC) offset format for the given offset.
icu::TimeZoneFormat::createInstance
static U_I18N_API TimeZoneFormat * createInstance(const Locale &locale, UErrorCode &status)
Creates an instance of TimeZoneFormat for the given locale.
icu::TimeZoneFormat::getDefaultParseOptions
U_I18N_API uint32_t getDefaultParseOptions() const
Returns the bitwise flags of UTimeZoneFormatParseOption representing the default parse options used b...
icu::TimeZoneFormat::formatOffsetLocalizedGMT
U_I18N_API UnicodeString & formatOffsetLocalizedGMT(int32_t offset, UnicodeString &result, UErrorCode &status) const
Returns the localized GMT(UTC) offset format for the given offset.
icu::TimeZoneFormat::parseOffsetLocalizedGMT
U_I18N_API int32_t parseOffsetLocalizedGMT(const UnicodeString &text, ParsePosition &pos) const
Returns offset from GMT(UTC) in milliseconds for the given localized GMT offset format string.
icu::TimeZoneFormat::setGMTOffsetPattern
U_I18N_API void setGMTOffsetPattern(UTimeZoneFormatGMTOffsetPatternType type, const UnicodeString &pattern, UErrorCode &status)
Sets the offset pattern for the given offset type.
icu::TimeZoneFormat::parse
U_I18N_API TimeZone * parse(UTimeZoneFormatStyle style, const UnicodeString &text, ParsePosition &pos, UTimeZoneFormatTimeType *timeType=nullptr) const
Returns a TimeZone by parsing the time zone string according to the given parse position,...
icu::TimeZoneFormat::getGMTOffsetDigits
U_I18N_API UnicodeString & getGMTOffsetDigits(UnicodeString &digits) const
Returns the decimal digit characters used for localized GMT format.
icu::TimeZoneFormat::getStaticClassID
static U_I18N_API UClassID getStaticClassID()
ICU "poor man's RTTI", returns a UClassID for this class.
icu::TimeZoneFormat::clone
virtual U_I18N_API TimeZoneFormat * clone() const override
Clone this object polymorphically.
icu::TimeZoneFormat::operator==
virtual U_I18N_API bool operator==(const Format &other) const override
Return true if the given Format objects are semantically equal.
icu::TimeZoneFormat::adoptTimeZoneNames
U_I18N_API void adoptTimeZoneNames(TimeZoneNames *tznames)
Sets the time zone display name data to this format instance.
icu::TimeZoneFormat::format
virtual U_I18N_API UnicodeString & format(UTimeZoneFormatStyle style, const TimeZone &tz, UDate date, UnicodeString &name, UTimeZoneFormatTimeType *timeType=nullptr) const
Returns the display name of the time zone at the given date for the style.
icu::TimeZoneFormat::setGMTPattern
U_I18N_API void setGMTPattern(const UnicodeString &pattern, UErrorCode &status)
Sets the localized GMT format pattern.
icu::TimeZoneFormat::parse
virtual U_I18N_API TimeZone * parse(UTimeZoneFormatStyle style, const UnicodeString &text, ParsePosition &pos, int32_t parseOptions, UTimeZoneFormatTimeType *timeType=nullptr) const
Returns a TimeZone by parsing the time zone string according to the given parse position,...
icu::TimeZoneFormat::formatOffsetISO8601Basic
U_I18N_API UnicodeString & formatOffsetISO8601Basic(int32_t offset, UBool useUtcIndicator, UBool isShort, UBool ignoreSeconds, UnicodeString &result, UErrorCode &status) const
Returns the ISO 8601 basic time zone string for the given offset.
icu::TimeZoneFormat::setDefaultParseOptions
U_I18N_API void setDefaultParseOptions(uint32_t flags)
Sets the default parse options.
icu::TimeZoneFormat::parseObject
virtual U_I18N_API void parseObject(const UnicodeString &source, Formattable &result, ParsePosition &parse_pos) const override
Parse a string to produce an object.
icu::TimeZoneFormat::setGMTZeroFormat
U_I18N_API void setGMTZeroFormat(const UnicodeString &gmtZeroFormat, UErrorCode &status)
Sets the localized GMT format string for GMT(UTC) itself (GMT offset is 0).
icu::TimeZoneFormat::TimeZoneFormat
U_I18N_API TimeZoneFormat(const Locale &locale, UErrorCode &status)
Constructs a TimeZoneFormat object for the specified locale.
icu::TimeZoneFormat::format
virtual U_I18N_API UnicodeString & format(const Formattable &obj, UnicodeString &appendTo, FieldPosition &pos, UErrorCode &status) const override
Format an object to produce a time zone display string using localized GMT offset format.
icu::TimeZoneFormat::setTimeZoneNames
U_I18N_API void setTimeZoneNames(const TimeZoneNames &tznames)
Sets the time zone display name data to this format instance.
icu::TimeZoneFormat::getGMTPattern
U_I18N_API UnicodeString & getGMTPattern(UnicodeString &pattern) const
Returns the localized GMT format pattern.
icu::TimeZoneFormat::operator=
U_I18N_API TimeZoneFormat & operator=(const TimeZoneFormat &other)
Assignment operator.
icu::TimeZoneFormat::parseOffsetShortLocalizedGMT
U_I18N_API int32_t parseOffsetShortLocalizedGMT(const UnicodeString &text, ParsePosition &pos) const
Returns offset from GMT(UTC) in milliseconds for the given short localized GMT offset format string.
icu::TimeZoneFormat::formatOffsetISO8601Extended
U_I18N_API UnicodeString & formatOffsetISO8601Extended(int32_t offset, UBool useUtcIndicator, UBool isShort, UBool ignoreSeconds, UnicodeString &result, UErrorCode &status) const
Returns the ISO 8601 extended time zone string for the given offset.
icu::TimeZoneFormat::getGMTOffsetPattern
U_I18N_API UnicodeString & getGMTOffsetPattern(UTimeZoneFormatGMTOffsetPatternType type, UnicodeString &pattern) const
Returns the offset pattern used for localized GMT format.
icu::TimeZoneFormat::TimeZoneFormat
U_I18N_API TimeZoneFormat(const TimeZoneFormat &other)
Copy constructor.
icu::TimeZoneFormat::parseOffsetISO8601
U_I18N_API int32_t parseOffsetISO8601(const UnicodeString &text, ParsePosition &pos) const
Returns offset from GMT(UTC) in milliseconds for the given ISO 8601 style time zone string.
icu::TimeZoneFormat::getTimeZoneNames
U_I18N_API const TimeZoneNames * getTimeZoneNames() const
Returns the time zone display name data used by this instance.
icu::TimeZoneFormat::setGMTOffsetDigits
U_I18N_API void setGMTOffsetDigits(const UnicodeString &digits, UErrorCode &status)
Sets the decimal digit characters used for localized GMT format.
icu::TimeZoneNames::MatchInfoCollection
MatchInfoCollection represents a collection of time zone name matches used by TimeZoneNames#find.
Definition tznames.h:310
icu::TimeZoneNames
TimeZoneNames is an abstract class representing the time zone display name data model defined by UTS#...
Definition tznames.h:131
icu::TimeZone
TimeZone represents a time zone offset, and also figures out daylight savings.
Definition timezone.h:133
icu::UnicodeString
UnicodeString is a string class that stores Unicode characters directly and provides similar function...
Definition unistr.h:303
format.h
C++ API: Base class for all formats.
timezone.h
C++ API: TimeZone object.
UTimeZoneFormatGMTOffsetPatternType
UTimeZoneFormatGMTOffsetPatternType
Constants for GMT offset pattern types.
Definition tzfmt.h:161
UTZFMT_PAT_NEGATIVE_HM
@ UTZFMT_PAT_NEGATIVE_HM
Negative offset with hours and minutes fields.
Definition tzfmt.h:176
UTZFMT_PAT_POSITIVE_HMS
@ UTZFMT_PAT_POSITIVE_HMS
Positive offset with hours, minutes and seconds fields.
Definition tzfmt.h:171
UTZFMT_PAT_NEGATIVE_HMS
@ UTZFMT_PAT_NEGATIVE_HMS
Negative offset with hours, minutes and seconds fields.
Definition tzfmt.h:181
UTZFMT_PAT_POSITIVE_HM
@ UTZFMT_PAT_POSITIVE_HM
Positive offset with hours and minutes fields.
Definition tzfmt.h:166
UTZFMT_PAT_NEGATIVE_H
@ UTZFMT_PAT_NEGATIVE_H
Negative offset with hours field.
Definition tzfmt.h:191
UTZFMT_PAT_COUNT
@ UTZFMT_PAT_COUNT
Number of UTimeZoneFormatGMTOffsetPatternType types.
Definition tzfmt.h:198
UTZFMT_PAT_POSITIVE_H
@ UTZFMT_PAT_POSITIVE_H
Positive offset with hours field.
Definition tzfmt.h:186
UTimeZoneFormatStyle
UTimeZoneFormatStyle
Constants for time zone display format style used by format/parse APIs in TimeZoneFormat.
Definition tzfmt.h:33
UTZFMT_STYLE_ZONE_ID
@ UTZFMT_STYLE_ZONE_ID
Time Zone ID, such as "America/Los_Angeles".
Definition tzfmt.h:144
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_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_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_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
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
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
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_GENERIC_LONG
@ UTZFMT_STYLE_GENERIC_LONG
Generic long non-location format, such as "Eastern Time".
Definition tzfmt.h:43
UTZFMT_STYLE_LOCALIZED_GMT
@ UTZFMT_STYLE_LOCALIZED_GMT
Localized GMT offset format, such as "GMT-05:00", "UTC+0100".
Definition tzfmt.h:63
UTZFMT_STYLE_EXEMPLAR_LOCATION
@ UTZFMT_STYLE_EXEMPLAR_LOCATION
Exemplar location, such as "Los Angeles" and "Paris".
Definition tzfmt.h:154
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
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
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
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
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
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_GENERIC_SHORT
@ UTZFMT_STYLE_GENERIC_SHORT
Generic short non-location format, such as "ET".
Definition tzfmt.h:48
UTZFMT_STYLE_SPECIFIC_LONG
@ UTZFMT_STYLE_SPECIFIC_LONG
Specific long format, such as "Eastern Standard Time".
Definition tzfmt.h:53
UTimeZoneFormatParseOption
UTimeZoneFormatParseOption
Constants for parse option flags, used for specifying optional parse behavior.
Definition tzfmt.h:228
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
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
UTimeZoneFormatTimeType
UTimeZoneFormatTimeType
Constants for time types used by TimeZoneFormat APIs for receiving time type (standard time,...
Definition tzfmt.h:206
UTZFMT_TIME_TYPE_DAYLIGHT
@ UTZFMT_TIME_TYPE_DAYLIGHT
Daylight saving time.
Definition tzfmt.h:221
UTZFMT_TIME_TYPE_UNKNOWN
@ UTZFMT_TIME_TYPE_UNKNOWN
Unknown.
Definition tzfmt.h:211
UTZFMT_TIME_TYPE_STANDARD
@ UTZFMT_TIME_TYPE_STANDARD
Standard time.
Definition tzfmt.h:216
tznames.h
C++ API: TimeZoneNames.
UTimeZoneNameType
UTimeZoneNameType
Constants for time zone display name types.
Definition tznames.h:31
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
UChar32
int32_t UChar32
Define UChar32 as a type for single Unicode code points.
Definition umachine.h:449
U_CDECL_END
#define U_CDECL_END
This is used to end a declaration of a library private ICU C API.
Definition umachine.h:86
UBool
int8_t UBool
The ICU boolean type, a signed-byte integer.
Definition umachine.h:269
U_CDECL_BEGIN
#define U_CDECL_BEGIN
This is used to begin a declaration of a library private ICU C API.
Definition umachine.h:85
UClassID
void * UClassID
UClassID is used to identify classes without using the compiler's RTTI.
Definition uobject.h:96
utypes.h
Basic definitions for ICU, for both C and C++ APIs.
UErrorCode
UErrorCode
Standard ICU4C error code type, a substitute for exceptions.
Definition utypes.h:509
U_I18N_API_CLASS
#define U_I18N_API_CLASS
Set to export library symbols from inside the i18n library, and to import them from outside,...
Definition utypes.h:457
U_I18N_API
#define U_I18N_API
Set to export library symbols from inside the i18n library, and to import them from outside.
Definition utypes.h:316
UDate
double UDate
Date and Time data type.
Definition utypes.h:218