<br />

Added: 7

## **PROTOCOLS**

## PropertyProvider

*Defined in [fuchsia.intl/property_provider.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.intl/property_provider.fidl;l=15)*

Provides internationalization properties.

Components that need to change their behavior in response to the user's internationalization
profile may request an instance of this service from their namespace, if available. A component
may choose to pass along the service that it received from its parent to its own children, or to
override it and apply additional customizations.

See also `fuchsia.ui.views.View`.

<br />

### GetProfile

Gets the user's internationalization profile.

#### Request

\<EMPTY\>

#### Response

| Name | Type |
|---|---|
| `profile` | `https://fuchsia.dev/reference/fidl/fuchsia.intl#Profile` |

### OnChange

Indicates that the properties may have changed and the client should query them again.

#### Response

\<EMPTY\>

## TimeZones

*Defined in [fuchsia.intl/time_zones.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.intl/time_zones.fidl;l=65)*

Provides information about time zones and offers date-time conversion methods.

TODO(https://fxbug.dev/42162409): Add time zone info methods, including offsets from UTC.

<br />

### AbsoluteToCivilTime

Converts the given absolute time to a civil date and time in the given time zone, using the
Gregorian calendar.

#### Request

| Name | Type |
|---|---|
| `time_zone_id` | `https://fuchsia.dev/reference/fidl/fuchsia.intl#TimeZoneId` |
| `absolute_time` | `https://fuchsia.dev/reference/zx//https://fuchsia.dev/reference/zx#Time` |

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.intl#TimeZones_AbsoluteToCivilTime_Result` |

### CivilToAbsoluteTime

Converts the given civil date and time in the given time zone to nanoseconds since the Unix
epoch.

#### Request

| Name | Type |
|---|---|
| `civil_time` | `https://fuchsia.dev/reference/fidl/fuchsia.intl#CivilTime` |
| `options` | `https://fuchsia.dev/reference/fidl/fuchsia.intl#CivilToAbsoluteTimeOptions` |

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.intl#TimeZones_CivilToAbsoluteTime_Result` |

### GetTimeZoneInfo

Retrieves details about a time zone at a specified one.

#### Request

| Name | Type |
|---|---|
| `time_zone_id` | `https://fuchsia.dev/reference/fidl/fuchsia.intl#TimeZoneId` |
| `at_time` | `https://fuchsia.dev/reference/zx//https://fuchsia.dev/reference/zx#Time` |

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.intl#TimeZones_GetTimeZoneInfo_Result` |

## **STRUCTS**

### CalendarId

*Defined in [fuchsia.intl/intl.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.intl/intl.fidl;l=38)*

Typed identifier for a single calendar system. Currently consists only of a calendar ID.

<br />

| Field | Type | Description | Default |
|---|---|---|---|
| `id` | `string` | Unicode BCP-47 Locale Identifier with an undefined language tag and a single extension specifying the calendar ID (from https://unicode.org/repos/cldr/trunk/common/bcp47/calendar.xml). Examples: "und-u-ca-gregory" "und-u-ca-islamic" | No default |

### LocaleId

*Defined in [fuchsia.intl/intl.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.intl/intl.fidl;l=17)*

Typed identifier for a single Locale, which is a set of internationalization-related properties.

Most APIs that consume locales will probably want to accept a vector of locales to account for
priority.

<br />

| Field | Type | Description | Default |
|---|---|---|---|
| `id` | `string` | Unicode BCP-47 Locale Identifier (http://www.unicode.org/reports/tr35/#BCP_47_Conformance). Must be canonicalized and well-formed. This field should not be populated from arbitrary user- or third-party input, but instead generated programmatically. Includes language, region, script, and variant, plus Unicode extensions (under the "u" singleton). Other extensions are allowed but ignored. Examples: "en-US" American English "fr-u-hc-h12" French, with 12-hour clock "ar-EG-u-fw-mon-nu-latn" Egyptian Arabic with "Latin" numerals and first day of week on Monday | No default |

### TimeZoneId

*Defined in [fuchsia.intl/intl.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.intl/intl.fidl;l=53)*

Typed identifier for a time zone.

<br />

| Field | Type | Description | Default |
|---|---|---|---|
| `id` | `string` | Time zone ID from tzdata, e.g. "America/New_York". See https://www.iana.org/time-zones. | No default |

### TimeZones_AbsoluteToCivilTime_Response

*Defined in [fuchsia.intl/time_zones.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.intl/time_zones.fidl;l=75)*

| Field | Type | Description | Default |
|---|---|---|---|
| `civil_time` | `https://fuchsia.dev/reference/fidl/fuchsia.intl#CivilTime` |   | No default |

### TimeZones_CivilToAbsoluteTime_Response

*Defined in [fuchsia.intl/time_zones.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.intl/time_zones.fidl;l=89)*

| Field | Type | Description | Default |
|---|---|---|---|
| `absolute_time` | `https://fuchsia.dev/reference/zx//https://fuchsia.dev/reference/zx#Time` |   | No default |

### TimeZones_GetTimeZoneInfo_Response

*Defined in [fuchsia.intl/time_zones.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.intl/time_zones.fidl;l=100)*

| Field | Type | Description | Default |
|---|---|---|---|
| `time_zone_info` | `https://fuchsia.dev/reference/fidl/fuchsia.intl#TimeZoneInfo` |   | No default |

## **ENUMS**

### DayOfWeek [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

Type: `uint8`

*Defined in [fuchsia.intl/calendar.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.intl/calendar.fidl;l=9)*

Enumeration of the days of the week.

<br />

| Name | Value | Description |
|---|---|---|
| ### SUNDAY | `1` |   |
| ### MONDAY | `2` |   |
| ### TUESDAY | `3` |   |
| ### WEDNESDAY | `4` |   |
| ### THURSDAY | `5` |   |
| ### FRIDAY | `6` |   |
| ### SATURDAY | `7` |   |

### Month [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

Type: `uint8`

*Defined in [fuchsia.intl/calendar.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.intl/calendar.fidl;l=21)*

Enumeration of the months of the year.

<br />

| Name | Value | Description |
|---|---|---|
| ### JANUARY | `1` |   |
| ### FEBRUARY | `2` |   |
| ### MARCH | `3` |   |
| ### APRIL | `4` |   |
| ### MAY | `5` |   |
| ### JUNE | `6` |   |
| ### JULY | `7` |   |
| ### AUGUST | `8` |   |
| ### SEPTEMBER | `9` |   |
| ### OCTOBER | `10` |   |
| ### NOVEMBER | `11` |   |
| ### DECEMBER | `12` |   |

### RepeatedTimeConversion [flexible](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

Type: `int32`

*Defined in [fuchsia.intl/time_zones.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.intl/time_zones.fidl;l=23)*

During a transition from daylight savings to standard time (when the clock is turned back), a
civil time can correspond to two possible absolute times. This setting determines which of those
times should be assumed during the conversion to absolute time.

TODO(https://fxbug.dev/42162861): Implement `AFTER_TRANSITION`.

<br />

| Name | Value | Description |
|---|---|---|
| ### BEFORE_TRANSITION | `1` | Returns the wall clock time before the transition. For example, in "America/New_York" on the night of the fall transition to standard time, `1:30 AM` is interpreted as `01:30-04:00` (EDT), which is `05:30Z`. |

### SkippedTimeConversion [flexible](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

Type: `int32`

*Defined in [fuchsia.intl/time_zones.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.intl/time_zones.fidl;l=36)*

During a transition from standard time to daylight savings time (when the clock is turned
forward), a span of civil times is skipped (usually one hour). This setting determines how
invalid civil times within this span should be treated.

TODO(https://fxbug.dev/42162861): Implement `BEFORE_TRANSITION` and `AFTER_TRANSITION`.

<br />

| Name | Value | Description |
|---|---|---|
| ### REJECT | `1` | Returns `TimeZonesError::INVALID_DATE` when trying to convert a skipped civil time. |
| ### NEXT_VALID_TIME | `2` | Returns the closest valid time after the requested time. For example, in "America/New_York" on the night of the spring transition to daylight savings time, `2:30 AM` doesn't exist, so the next valid time, `3:00 AM` (EDT) is returned instead. |

### TemperatureUnit [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

Type: `uint32`

*Defined in [fuchsia.intl/intl.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.intl/intl.fidl;l=60)*

Selection of [temperature units](https://en.wikipedia.org/wiki/Degree_(temperature)).

<br />

| Name | Value | Description |
|---|---|---|
| ### CELSIUS | `0` | The temperature should be formatted to show temperature in degrees Celsius. |
| ### FAHRENHEIT | `1` | The temperature should be formatted to show temperature in degrees Fahrenheit. |

### TimeZonesError [flexible](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

Type: `int32`

*Defined in [fuchsia.intl/time_zones.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.intl/time_zones.fidl;l=9)*

| Name | Value | Description |
|---|---|---|
| ### INTERNAL_ERROR | `1` | An internal error has occurred within the service. |
| ### UNKNOWN_TIME_ZONE | `2` | The requested time zone ID is invalid. |
| ### INVALID_DATE | `3` | The provided date is out of range or invalid. |

## **TABLES**

### CivilTime

*Defined in [fuchsia.intl/time_zones.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.intl/time_zones.fidl;l=108)*

Describes a time on a civil calendar (Gregorian), with nanosecond precision. This is roughly
equivalent to the `tm` struct in `time.h` in the C standard library, and is intended as a
structured intermediate format for printing or parsing dates.

<br />

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `year` | `uint16` | Year, in the closed range `[1678, 2262]`. |
| ### 2 | `month` | `https://fuchsia.dev/reference/fidl/fuchsia.intl#Month` | Month of the year. |
| ### 3 | `day` | `uint8` | Day of the month, in the closed range `[1, 31]`. |
| ### 4 | `hour` | `uint8` | Hour of the day, in the closed range `[0, 23]`. |
| ### 5 | `minute` | `uint8` | Minute of the hour, in the closed range `[0, 59]`. |
| ### 6 | `second` | `uint8` | Second of the minute, in the closed range `[0, 59]`. (Note that Fuchsia does not currently calculate leap seconds when converting dates.) |
| ### 7 | `nanos` | `uint64` | Nanosecond, in the closed range `[0, 999_999_999]`. |
| ### 8 | `weekday` | `https://fuchsia.dev/reference/fidl/fuchsia.intl#DayOfWeek` | Day of the week. |
| ### 9 | `year_day` | `uint16` | Day of the year, in the closed range `[0, 365]`. |
| ### 10 | `time_zone_id` | `https://fuchsia.dev/reference/fidl/fuchsia.intl#TimeZoneId` | The time zone corresponding to this time. If omitted, the default is UTC. |

### CivilToAbsoluteTimeOptions

*Defined in [fuchsia.intl/time_zones.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.intl/time_zones.fidl;l=48)*

Options for `TimeZones.CivilToAbsoluteTime`.

<br />

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `repeated_time_conversion` | `https://fuchsia.dev/reference/fidl/fuchsia.intl#RepeatedTimeConversion` | Optional setting for handling repeated times during backward daylight savings time transitions. Default: `BEFORE_TRANSITION`. |
| ### 2 | `skipped_time_conversion` | `https://fuchsia.dev/reference/fidl/fuchsia.intl#SkippedTimeConversion` | Optional setting for handling skipped times during forward daylight savings time transitions. Default: `NEXT_VALID_TIME`. |

### Profile

*Defined in [fuchsia.intl/intl.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.intl/intl.fidl;l=74)*

A collection of ranked internationalization properties.

There is no implied origin for this information; it might come from a user account, device
settings, a synthesis of user settings and app-specific overrides, or anywhere else.

Language-independent properties that are supported by Unicode BCP-47 Locale IDs (e.g.
first-day-of-week, time zone) are denormalized into the locale IDs in `locales`.

<br />

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `locales` | `vector<https://fuchsia.dev/reference/fidl/fuchsia.intl#LocaleId>` | Ranked list of locales (in descending order of preference). The vector will always be set, and always contain at least one element. For example, locales = \[ LocaleId("en-US") \] is valid, but locales = \[\], or locales = is not. |
| ### 2 | `calendars` | `vector<https://fuchsia.dev/reference/fidl/fuchsia.intl#CalendarId>` | Ranked list of calendars (in descending order of preference). The first entry is the primary calendar, and will be equal to the calendar indicated in `locales`. The vector will always be set, and always contain at least one element. The list allows multiple ranked preferences, and is intended for use by applications that can display multiple calendar systems. |
| ### 3 | `time_zones` | `vector<https://fuchsia.dev/reference/fidl/fuchsia.intl#TimeZoneId>` | Ranked list of time zones (in descending order). The first entry is the primary time zone, which should be used by default for formatting dates and times; it will be equal to the calendar indicated in `locales`. The list is intended for use by applications that can display multiple time zones, e.g. a world clock. The vector will always be set, and always contain at least one element. On Fuchsia, the default time zone is always `DEFAULT_TIME_ZONE_ID` when no more specific time zones have been defined or selected. |
| ### 4 | `temperature_unit` | `https://fuchsia.dev/reference/fidl/fuchsia.intl#TemperatureUnit` | Selected temperature unit. The unit is always reported: if there is no setting in the current environment, the default value of CELSIUS is used. |

### RegulatoryDomain

*Defined in [fuchsia.intl/intl.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.intl/intl.fidl;l=7)*

Typed identifier for a regulatory domain as specified in the IEEE 802.11 standard.

<br />

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `country_code` | `string` | ISO 3166-1 alpha-2, a two-letter code representing a domain of operation. (https://www.iso.org/publication/PUB500001.html) |

### TimeZoneInfo

*Defined in [fuchsia.intl/time_zones.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.intl/time_zones.fidl;l=136)*

Describes a Time Zone's properties at a particular moment in time.

TODO(https://fxbug.dev/42162409): Additional fields with a breakdown of offsets and DST status.

<br />

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `id` | `https://fuchsia.dev/reference/fidl/fuchsia.intl#TimeZoneId` | The time zone's IANA ID. |
| ### 2 | `total_offset_at_time` | `https://fuchsia.dev/reference/zx//https://fuchsia.dev/reference/zx#Duration` | The total offset (including Daylight Savings, if the time zone is in Daylight Savings Time) from UTC at the queried time (`at_time`). If the time zone is ahead of UTC, this will be a positive value; if behind UTC, a negative value. |
| ### 3 | `in_dst_at_time` | `bool` | Indicates whether the time zone is in Daylight Savings Time at the queried time (`at_time`). |

## **UNIONS**

### TimeZones_AbsoluteToCivilTime_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.intl/time_zones.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.intl/time_zones.fidl;l=75)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.intl#TimeZones_AbsoluteToCivilTime_Response` |   |
| ### 2 | `err` | `https://fuchsia.dev/reference/fidl/fuchsia.intl#TimeZonesError` |   |

<br />

### TimeZones_CivilToAbsoluteTime_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.intl/time_zones.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.intl/time_zones.fidl;l=89)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.intl#TimeZones_CivilToAbsoluteTime_Response` |   |
| ### 2 | `err` | `https://fuchsia.dev/reference/fidl/fuchsia.intl#TimeZonesError` |   |

<br />

### TimeZones_GetTimeZoneInfo_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.intl/time_zones.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.intl/time_zones.fidl;l=100)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.intl#TimeZones_GetTimeZoneInfo_Response` |   |
| ### 2 | `err` | `https://fuchsia.dev/reference/fidl/fuchsia.intl#TimeZonesError` |   |

<br />

## **CONSTANTS**

| Name | Value | Type | Description |
|---|---|---|---|
| [DEFAULT_TIME_ZONE_ID](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.intl/intl.fidl;l=50) | `UTC` | `String` | This is the time zone reported when no time zones have been set. |