You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/ldml/tr35-dates.md
+15-9
Original file line number
Diff line number
Diff line change
@@ -1696,6 +1696,8 @@ Note: A generic location format is constructed by a part of time zone ID represe
1696
1696
* "Pacific Daylight Time" (long)
1697
1697
* "PDT" (short)
1698
1698
1699
+
**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".
1700
+
1699
1701
**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:
1700
1702
1701
1703
* "GMT+03:30" (long)
@@ -1877,15 +1879,19 @@ Some of the examples are drawn from real data, while others are for illustration
1877
1879
* "Pacific Time (Canada)" // for the zone Vancouver in the locale en_MX.
1878
1880
* "Mountain Time (Phoenix)"
1879
1881
* "Pacific Time (Whitehorse)"
1880
-
5. For the generic location format:
1881
-
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.
1882
+
5. For the location formats (generic or specific):
1883
+
1. Get the _regionFormat_ format according to type (generic, standard, or daylight).
1884
+
2. From the TZDB get the country code for the zone, and determine whether there is only one timezone in the country.
1885
+
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.
1886
+
2. Otherwise, continue with the localized name of the exemplar city for the zone.
1887
+
3. Format the region format obtained in step 1 with the location obtained in step 2.
1882
1888
* Examples:
1883
-
*Europe/Rome → IT → "Italy Time" // for English
1884
-
* Asia/Shanghai → CN → "China Time" // Asia/Shanghai is the _primaryZone_ for China
1885
-
*Africa/Monrovia → LR → "Hora de Liberja"
1886
-
*America/Havana → CU → "Hora de CU" // if CU is not localized
1887
-
2. Otherwise format the exemplar city with the _regionFormat_, and return it.
1888
-
1.America/Buenos_Aires → "Buenos Aires Time"
1889
+
*America/Buenos_Aires → "Buenos Aires Time" // multiple zones in AR
1890
+
* Asia/Shanghai → "China Time" // Asia/Shanghai is the _primaryZone_ for CN
1891
+
*Asia/Shanghai → "China Summer Time" // daylight
1892
+
*Europe/Rome → "Italy Time" // Europe/Rome is the only zone in IT
1893
+
* Africa/Monrovia → "Hora de Liberja"
1894
+
*America/Havana → "Hora de CU" // if CU is not localized
1889
1895
1890
1896
> **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.
1891
1897
@@ -2264,7 +2270,7 @@ Notes for the table below:
2264
2270
<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>
2265
2271
<tr><td>zzzz</td><td>Pacific Daylight Time</td>
2266
2272
<td colspan="2">The <i>long specific non-location format</i>.
2267
-
Where that is unavailable, falls back to the <i>long localized GMT format</i> ("OOOO").</td></tr>
2273
+
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>
0 commit comments