ICU 72.1 72.1
Data Structures | Namespaces | Typedefs | Enumerations
tzfmt.h File Reference

C++ API: TimeZoneFormat. More...

#include "unicode/utypes.h"
#include "unicode/format.h"
#include "unicode/timezone.h"
#include "unicode/tznames.h"

Go to the source code of this file.

Data Structures

class  icu::TimeZoneFormat
 TimeZoneFormat supports time zone display name formatting and parsing. More...
 

Namespaces

namespace  icu
 File coll.h.
 

Typedefs

typedef enum UTimeZoneFormatStyle UTimeZoneFormatStyle
 Constants for time zone display format style used by format/parse APIs in TimeZoneFormat. More...
 
typedef enum UTimeZoneFormatGMTOffsetPatternType UTimeZoneFormatGMTOffsetPatternType
 Constants for GMT offset pattern types. More...
 
typedef enum UTimeZoneFormatTimeType UTimeZoneFormatTimeType
 Constants for time types used by TimeZoneFormat APIs for receiving time type (standard time, daylight time or unknown). More...
 
typedef enum UTimeZoneFormatParseOption UTimeZoneFormatParseOption
 Constants for parse option flags, used for specifying optional parse behavior. More...
 

Enumerations

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
}
 Constants for time zone display format style used by format/parse APIs in TimeZoneFormat. More...
 
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 , UTZFMT_PAT_COUNT = 6
}
 Constants for GMT offset pattern types. More...
 
enum  UTimeZoneFormatTimeType { UTZFMT_TIME_TYPE_UNKNOWN , UTZFMT_TIME_TYPE_STANDARD , UTZFMT_TIME_TYPE_DAYLIGHT }
 Constants for time types used by TimeZoneFormat APIs for receiving time type (standard time, daylight time or unknown). More...
 
enum  UTimeZoneFormatParseOption { UTZFMT_PARSE_OPTION_NONE = 0x00 , UTZFMT_PARSE_OPTION_ALL_STYLES = 0x01 , UTZFMT_PARSE_OPTION_TZ_DATABASE_ABBREVIATIONS = 0x02 }
 Constants for parse option flags, used for specifying optional parse behavior. More...
 

Detailed Description

C++ API: TimeZoneFormat.

Definition in file tzfmt.h.

Typedef Documentation

◆ UTimeZoneFormatGMTOffsetPatternType

Constants for GMT offset pattern types.

Stable:
ICU 50

◆ UTimeZoneFormatParseOption

Constants for parse option flags, used for specifying optional parse behavior.

Stable:
ICU 50

◆ UTimeZoneFormatStyle

Constants for time zone display format style used by format/parse APIs in TimeZoneFormat.

Stable:
ICU 50

◆ UTimeZoneFormatTimeType

Constants for time types used by TimeZoneFormat APIs for receiving time type (standard time, daylight time or unknown).

Stable:
ICU 50

Enumeration Type Documentation

◆ UTimeZoneFormatGMTOffsetPatternType

Constants for GMT offset pattern types.

Stable:
ICU 50
Enumerator
UTZFMT_PAT_POSITIVE_HM 

Positive offset with hours and minutes fields.

Stable:
ICU 50
UTZFMT_PAT_POSITIVE_HMS 

Positive offset with hours, minutes and seconds fields.

Stable:
ICU 50
UTZFMT_PAT_NEGATIVE_HM 

Negative offset with hours and minutes fields.

Stable:
ICU 50
UTZFMT_PAT_NEGATIVE_HMS 

Negative offset with hours, minutes and seconds fields.

Stable:
ICU 50
UTZFMT_PAT_POSITIVE_H 

Positive offset with hours field.

Stable:
ICU 51
UTZFMT_PAT_NEGATIVE_H 

Negative offset with hours field.

Stable:
ICU 51
UTZFMT_PAT_COUNT 

Number of UTimeZoneFormatGMTOffsetPatternType types.

Internal:
Do not use. This API is for internal use only.

Definition at line 161 of file tzfmt.h.

◆ UTimeZoneFormatParseOption

Constants for parse option flags, used for specifying optional parse behavior.

Stable:
ICU 50
Enumerator
UTZFMT_PARSE_OPTION_NONE 

No option.

Stable:
ICU 50
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, look for the name from display names used by other styles.

Stable:
ICU 50
UTZFMT_PARSE_OPTION_TZ_DATABASE_ABBREVIATIONS 

When parsing a time zone display name in UTZFMT_STYLE_SPECIFIC_SHORT, look for the IANA tz database compatible zone abbreviations in addition to the localized names coming from the icu::TimeZoneNames currently used by the icu::TimeZoneFormat.

Stable:
ICU 54

Definition at line 228 of file tzfmt.h.

◆ UTimeZoneFormatStyle

Constants for time zone display format style used by format/parse APIs in TimeZoneFormat.

Stable:
ICU 50
Enumerator
UTZFMT_STYLE_GENERIC_LOCATION 

Generic location format, such as "United States Time (New York)", "Italy Time".

Stable:
ICU 50
UTZFMT_STYLE_GENERIC_LONG 

Generic long non-location format, such as "Eastern Time".

Stable:
ICU 50
UTZFMT_STYLE_GENERIC_SHORT 

Generic short non-location format, such as "ET".

Stable:
ICU 50
UTZFMT_STYLE_SPECIFIC_LONG 

Specific long format, such as "Eastern Standard Time".

Stable:
ICU 50
UTZFMT_STYLE_SPECIFIC_SHORT 

Specific short format, such as "EST", "PDT".

Stable:
ICU 50
UTZFMT_STYLE_LOCALIZED_GMT 

Localized GMT offset format, such as "GMT-05:00", "UTC+0100".

Stable:
ICU 50
UTZFMT_STYLE_LOCALIZED_GMT_SHORT 

Short localized GMT offset format, such as "GMT-5", "UTC+1:30" This style is equivalent to the LDML date format pattern "O".

Stable:
ICU 51
UTZFMT_STYLE_ISO_BASIC_SHORT 

Short ISO 8601 local time difference (basic format) or the UTC indicator.

For example, "-05", "+0530", and "Z"(UTC). This style is equivalent to the LDML date format pattern "X".

Stable:
ICU 51
UTZFMT_STYLE_ISO_BASIC_LOCAL_SHORT 

Short ISO 8601 locale time difference (basic format).

For example, "-05" and "+0530". This style is equivalent to the LDML date format pattern "x".

Stable:
ICU 51
UTZFMT_STYLE_ISO_BASIC_FIXED 

Fixed width ISO 8601 local time difference (basic format) or the UTC indicator.

For example, "-0500", "+0530", and "Z"(UTC). This style is equivalent to the LDML date format pattern "XX".

Stable:
ICU 51
UTZFMT_STYLE_ISO_BASIC_LOCAL_FIXED 

Fixed width ISO 8601 local time difference (basic format).

For example, "-0500" and "+0530". This style is equivalent to the LDML date format pattern "xx".

Stable:
ICU 51
UTZFMT_STYLE_ISO_BASIC_FULL 

ISO 8601 local time difference (basic format) with optional seconds field, or the UTC indicator.

For example, "-0500", "+052538", and "Z"(UTC). This style is equivalent to the LDML date format pattern "XXXX".

Stable:
ICU 51
UTZFMT_STYLE_ISO_BASIC_LOCAL_FULL 

ISO 8601 local time difference (basic format) with optional seconds field.

For example, "-0500" and "+052538". This style is equivalent to the LDML date format pattern "xxxx".

Stable:
ICU 51
UTZFMT_STYLE_ISO_EXTENDED_FIXED 

Fixed width ISO 8601 local time difference (extended format) or the UTC indicator.

For example, "-05:00", "+05:30", and "Z"(UTC). This style is equivalent to the LDML date format pattern "XXX".

Stable:
ICU 51
UTZFMT_STYLE_ISO_EXTENDED_LOCAL_FIXED 

Fixed width ISO 8601 local time difference (extended format).

For example, "-05:00" and "+05:30". This style is equivalent to the LDML date format pattern "xxx" and "ZZZZZ".

Stable:
ICU 51
UTZFMT_STYLE_ISO_EXTENDED_FULL 

ISO 8601 local time difference (extended format) with optional seconds field, or the UTC indicator.

For example, "-05:00", "+05:25:38", and "Z"(UTC). This style is equivalent to the LDML date format pattern "XXXXX".

Stable:
ICU 51
UTZFMT_STYLE_ISO_EXTENDED_LOCAL_FULL 

ISO 8601 local time difference (extended format) with optional seconds field.

For example, "-05:00" and "+05:25:38". This style is equivalent to the LDML date format pattern "xxxxx".

Stable:
ICU 51
UTZFMT_STYLE_ZONE_ID 

Time Zone ID, such as "America/Los_Angeles".

Stable:
ICU 51
UTZFMT_STYLE_ZONE_ID_SHORT 

Short Time Zone ID (BCP 47 Unicode location extension, time zone type value), such as "uslax".

Stable:
ICU 51
UTZFMT_STYLE_EXEMPLAR_LOCATION 

Exemplar location, such as "Los Angeles" and "Paris".

Stable:
ICU 51

Definition at line 33 of file tzfmt.h.

◆ UTimeZoneFormatTimeType

Constants for time types used by TimeZoneFormat APIs for receiving time type (standard time, daylight time or unknown).

Stable:
ICU 50
Enumerator
UTZFMT_TIME_TYPE_UNKNOWN 

Unknown.

Stable:
ICU 50
UTZFMT_TIME_TYPE_STANDARD 

Standard time.

Stable:
ICU 50
UTZFMT_TIME_TYPE_DAYLIGHT 

Daylight saving time.

Stable:
ICU 50

Definition at line 206 of file tzfmt.h.