Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLDR-18074 Add specific-non-location -> specific location fallback #4183

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 15 additions & 9 deletions docs/ldml/tr35-dates.md
Original file line number Diff line number Diff line change
Expand Up @@ -1696,6 +1696,8 @@ Note: A generic location format is constructed by a part of time zone ID represe
* "Pacific Daylight Time" (long)
* "PDT" (short)

**Specific location format:** This format does not have a symbol, but is used in the fallback chain for the _specific non-location format_. Like the _generic location format_ it uses time zone locations, but formats these in a zone-variant aware way, e.g. "France Summer Time".

**Localized GMT format:** A constant, specific offset from GMT (or UTC), which may be in a translated form. There are two styles for this. The first is used when there is an explicit non-zero offset from GMT; this style is specified by the `<gmtFormat>` element and `<hourFormat>` element. The long format always uses 2-digit hours field and minutes field, with optional 2-digit seconds field. The short format is intended for the shortest representation and uses hour fields without leading zero, with optional 2-digit minutes and seconds fields. The digits used for hours, minutes and seconds fields in this format are the locale's default decimal digits:

* "GMT+03:30" (long)
Expand Down Expand Up @@ -1877,15 +1879,19 @@ Some of the examples are drawn from real data, while others are for illustration
* "Pacific Time (Canada)" // for the zone Vancouver in the locale en_MX.
* "Mountain Time (Phoenix)"
* "Pacific Time (Whitehorse)"
5. For the generic location format:
1. From the TZDB get the country code for the zone, and determine whether there is only one timezone in the country. If there is only one timezone or if the zone id is in the `<primaryZones>` list, format the country name with the _regionFormat_, and return it.
5. For the location formats (generic or specific):
1. Get the _regionFormat_ format according to type (generic, standard, or daylight).
2. From the TZDB get the country code for the zone, and determine whether there is only one timezone in the country.
1. If there is only one timezone or if the zone id is in the `<primaryZones>` list, continue with short country name, if it exists, otherwise the country name.
2. Otherwise, continue with the localized name of the exemplar city for the zone.
3. Format the region format obtained in step 1 with the location obtained in step 2.
* Examples:
* Europe/RomeIT → "Italy Time" // for English
* Asia/Shanghai → CN → "China Time" // Asia/Shanghai is the _primaryZone_ for China
* Africa/MonroviaLR → "Hora de Liberja"
* America/HavanaCU → "Hora de CU" // if CU is not localized
2. Otherwise format the exemplar city with the _regionFormat_, and return it.
1. America/Buenos_Aires → "Buenos Aires Time"
* America/Buenos_Aires"Buenos Aires Time" // multiple zones in AR
* Asia/Shanghai → "China Time" // Asia/Shanghai is the _primaryZone_ for CN
* Asia/Shanghai"China Summer Time" // daylight
* Europe/Rome"Italy Time" // Europe/Rome is the only zone in IT
* Africa/Monrovia → "Hora de Liberja"
* America/Havana → "Hora de CU" // if CU is not localized

> **Note:** If a language does require grammatical changes when composing strings, then the _regionFormat_ should either use a neutral format such as "Heure: {0}", or put all exceptional cases in explicitly translated strings.

Expand Down Expand Up @@ -2264,7 +2270,7 @@ Notes for the table below:
<td colspan="2">The <i>short specific non-location format</i>. Where that is unavailable, falls back to the <i>short localized GMT format</i> ("O").</td></tr>
<tr><td>zzzz</td><td>Pacific Daylight Time</td>
<td colspan="2">The <i>long specific non-location format</i>.
Where that is unavailable, falls back to the <i>long localized GMT format</i> ("OOOO").</td></tr>
Where that is unavailable, falls back to the <i>specific location format</i>, then the <i>short localized GMT format</i> as the final fallback.</td></tr>
<!-- Z -->
<tr><td rowspan="3">Z</td><td>Z..ZZZ</td><td>-0800</td>
<td colspan="2">The <i>ISO8601 basic format</i> with hours, minutes and optional seconds fields.
Expand Down
Loading