Skip to content

Commit a7ca577

Browse files
CLDR-18236 Add gmtUnknownFormat (#4296)
1 parent 28f0a29 commit a7ca577

File tree

17 files changed

+71
-13
lines changed

17 files changed

+71
-13
lines changed

common/dtd/ldml.dtd

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1718,7 +1718,7 @@ CLDR data files are interpreted according to the LDML specification (http://unic
17181718
<!ATTLIST relativePeriod draft (approved | contributed | provisional | unconfirmed) #IMPLIED >
17191719
<!--@METADATA-->
17201720

1721-
<!ELEMENT timeZoneNames ( alias | ( hourFormat*, hoursFormat*, gmtFormat*, gmtZeroFormat*, regionFormat*, fallbackFormat*, fallbackRegionFormat*, abbreviationFallback*, preferenceOrdering*, singleCountries*, default*, zone*, metazone*, special* ) ) >
1721+
<!ELEMENT timeZoneNames ( alias | ( hourFormat*, hoursFormat*, gmtFormat*, gmtZeroFormat*, gmtUnknownFormat*, regionFormat*, fallbackFormat*, fallbackRegionFormat*, abbreviationFallback*, preferenceOrdering*, singleCountries*, default*, zone*, metazone*, special* ) ) >
17221722
<!ATTLIST timeZoneNames draft (approved | contributed | provisional | unconfirmed | true | false) #IMPLIED >
17231723
<!--@METADATA-->
17241724
<!--@DEPRECATED-->
@@ -1765,6 +1765,15 @@ CLDR data files are interpreted according to the LDML specification (http://unic
17651765
<!ATTLIST gmtZeroFormat references CDATA #IMPLIED >
17661766
<!--@METADATA-->
17671767

1768+
<!ELEMENT gmtUnknownFormat ( #PCDATA ) >
1769+
<!ATTLIST gmtUnknownFormat alt NMTOKENS #IMPLIED >
1770+
<!--@MATCH:literal/variant-->
1771+
<!ATTLIST gmtUnknownFormat draft (approved | contributed | provisional | unconfirmed | true | false) #IMPLIED >
1772+
<!--@METADATA-->
1773+
<!--@DEPRECATED:true, false-->
1774+
<!ATTLIST gmtUnknownFormat references CDATA #IMPLIED >
1775+
<!--@METADATA-->
1776+
17681777
<!ELEMENT regionFormat ( #PCDATA ) >
17691778
<!ATTLIST regionFormat type (standard | daylight) #IMPLIED >
17701779
<!ATTLIST regionFormat alt NMTOKENS #IMPLIED >

common/dtd/ldml.xsd

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4512,6 +4512,7 @@ Note: DTD @-annotations are not currently converted to .xsd. For full CLDR file
45124512
<xs:element maxOccurs="unbounded" minOccurs="0" ref="hoursFormat"/>
45134513
<xs:element maxOccurs="unbounded" minOccurs="0" ref="gmtFormat"/>
45144514
<xs:element maxOccurs="unbounded" minOccurs="0" ref="gmtZeroFormat"/>
4515+
<xs:element maxOccurs="unbounded" minOccurs="0" ref="gmtUnknownFormat"/>
45154516
<xs:element maxOccurs="unbounded" minOccurs="0" ref="regionFormat"/>
45164517
<xs:element maxOccurs="unbounded" minOccurs="0" ref="fallbackFormat"/>
45174518
<xs:element maxOccurs="unbounded" minOccurs="0" ref="fallbackRegionFormat"/>
@@ -4634,6 +4635,28 @@ Note: DTD @-annotations are not currently converted to .xsd. For full CLDR file
46344635

46354636

46364637

4638+
<xs:element name="gmtUnknownFormat">
4639+
<xs:complexType mixed="true">
4640+
<xs:attribute name="alt" type="xs:NMTOKENS"/>
4641+
<xs:attribute name="draft">
4642+
<xs:simpleType>
4643+
<xs:restriction base="xs:token">
4644+
<xs:enumeration value="approved"/>
4645+
<xs:enumeration value="contributed"/>
4646+
<xs:enumeration value="provisional"/>
4647+
<xs:enumeration value="unconfirmed"/>
4648+
<xs:enumeration value="true"/>
4649+
<xs:enumeration value="false"/>
4650+
</xs:restriction>
4651+
</xs:simpleType>
4652+
</xs:attribute>
4653+
<xs:attribute name="references"/>
4654+
</xs:complexType>
4655+
</xs:element>
4656+
4657+
4658+
4659+
46374660
<xs:element name="regionFormat">
46384661
<xs:complexType mixed="true">
46394662
<xs:attribute name="type">

common/main/root.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3192,6 +3192,7 @@ Warnings: All cp values have U+FE0F characters removed. See /annotationsDerived/
31923192
<hourFormat>+HH:mm;-HH:mm</hourFormat>
31933193
<gmtFormat>GMT{0}</gmtFormat>
31943194
<gmtZeroFormat>GMT</gmtZeroFormat>
3195+
<gmtUnknownFormat>GMT+?</gmtUnknownFormat>
31953196
<regionFormat>{0}</regionFormat>
31963197
<regionFormat type="daylight">{0} (+1)</regionFormat>
31973198
<regionFormat type="standard">{0} (+0)</regionFormat>

common/supplemental-temp/coverageLevels2.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,7 @@ For terms of use, see http://www.unicode.org/copyright.html
356356
<coverageLevel value="basic" match="dates/timeZoneNames/fallbackFormat"/>
357357
<coverageLevel value="basic" match="dates/timeZoneNames/gmtFormat"/>
358358
<coverageLevel value="basic" match="dates/timeZoneNames/gmtZeroFormat"/>
359+
<coverageLevel value="basic" match="dates/timeZoneNames/gmtUnknownFormat"/>
359360
<coverageLevel value="basic" match="dates/timeZoneNames/hourFormat"/>
360361
<coverageLevel value="basic" match="dates/timeZoneNames/metazone[@type='GMT']/long/standard"/>
361362

common/supplemental/coverageLevels.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,7 @@ For terms of use, see http://www.unicode.org/copyright.html
387387
<coverageLevel value="basic" match="dates/timeZoneNames/fallbackFormat"/>
388388
<coverageLevel value="basic" match="dates/timeZoneNames/gmtFormat"/>
389389
<coverageLevel value="basic" match="dates/timeZoneNames/gmtZeroFormat"/>
390+
<coverageLevel value="basic" match="dates/timeZoneNames/gmtUnknownFormat"/>
390391
<coverageLevel value="basic" match="dates/timeZoneNames/hourFormat"/>
391392
<coverageLevel value="basic" match="dates/timeZoneNames/metazone[@type='GMT']/long/standard"/>
392393

docs/ldml/tr35-dates.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1355,11 +1355,12 @@ For examples, see [Day Periods Chart](https://www.unicode.org/cldr/charts/46/sup
13551355
## <a name="Time_Zone_Names" href="#Time_Zone_Names">Time Zone Names</a>
13561356

13571357
```xml
1358-
<!ELEMENT timeZoneNames (alias | (hourFormat*, gmtFormat*, gmtZeroFormat*, regionFormat*, fallbackFormat*, zone*, metazone*, special*)) >
1358+
<!ELEMENT timeZoneNames (alias | (hourFormat*, gmtFormat*, gmtZeroFormat*, gmtUnknownFormat*, regionFormat*, fallbackFormat*, zone*, metazone*, special*)) >
13591359

13601360
<!ELEMENT hourFormat ( #PCDATA ) >
13611361
<!ELEMENT gmtFormat ( #PCDATA ) >
13621362
<!ELEMENT gmtZeroFormat ( #PCDATA ) >
1363+
<!ELEMENT gmtUnknownFormat ( #PCDATA ) >
13631364

13641365
<!ELEMENT regionFormat ( #PCDATA ) >
13651366
<!ATTLIST regionFormat type ( standard | daylight ) #IMPLIED >
@@ -1471,7 +1472,8 @@ The following subelements of `<timeZoneNames>` are used to control the fallback
14711472
<tr><td>"-1200"</td></tr>
14721473
<tr><td rowspan="2">gmtFormat</td><td>"GMT{0}"</td><td>"GMT-0800"</td></tr>
14731474
<tr><td>"{0}ВпГ"</td><td>"-0800ВпГ"</td></tr>
1474-
<tr><td>gmtZeroFormat</td><td>"GMT"</td><td>Specifies how GMT/UTC with no explicit offset (implied 0 offset) should be represented.</td></tr>
1475+
<tr><td>gmtZeroFormat</td><td>"GMT"</td><td>Specifies how GMT/UTC with an offset of zero should be represented.</td></tr>
1476+
<tr><td>gmtUnknownFormat</td><td>"GMT"</td><td>Specifies how GMT/UTC with an unknown offset should be represented.</td></tr>
14751477
<tr><td rowspan="2">regionFormat</td><td>"{0} Time"</td><td>"Japan Time"</td></tr>
14761478
<tr><td>"Hora de {0}"</td><td>"Hora de Japón"</td></tr>
14771479
<tr><td rowspan="2">regionFormat type="daylight"<br>(or "standard")</td><td>"{0} Daylight Time"</td><td>"France Daylight Time"</td></tr><tr><td>"horario de verano de {0}"</td><td>"horario de verano de Francia"</td></tr>
@@ -1699,20 +1701,28 @@ Note: A generic location format is constructed by a part of time zone ID represe
16991701

17001702
**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".
17011703

1702-
**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:
1704+
**Localized GMT format:** A constant, specific offset from GMT (or UTC), which may be in a translated form. There are three styles for this:
1705+
1706+
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:
17031707

17041708
* "GMT+03:30" (long)
17051709
* "GMT+3:30" (short)
17061710
* "UTC-03.00" (long)
17071711
* "UTC-3" (short)
17081712
* "Гринуич+03:30" (long)
17091713

1710-
Otherwise (when the offset from GMT is zero, referring to GMT itself) the style specified by the `<gmtZeroFormat>` element is used:
1714+
The second is used when there is an explicit zero offset from GMT. It is specified by the `<gmtZeroFormat>` element:
17111715

17121716
* "GMT"
17131717
* "UTC"
17141718
* "Гринуич"
17151719

1720+
The third is used when the offset from GMT is unknown. It is specified by the `<gmtUnknownFormat>` element:
1721+
1722+
* "GMT+?"
1723+
* "UTC+?"
1724+
* "Гринуич+?"
1725+
17161726
**ISO 8601 time zone formats:** The formats based on the [[ISO 8601](tr35.md#ISO8601)] local time difference from UTC ("+" sign is used when local time offset is 0), or the UTC indicator ("Z" - only when the local time offset is 0 and the specifier X\* is used). The ISO 8601 basic format does not use a separator character between hours and minutes field, while the extended format uses colon (':') as the separator. The ISO 8601 basic format with hours and minutes fields is equivalent to RFC 822 zone format.
17171727

17181728
* "-0800" (basic)
@@ -1845,6 +1855,7 @@ Some of the examples are drawn from real data, while others are for illustration
18451855
* America/Los_Angeles → "HMG-07:00" // daylight time
18461856
* Etc/GMT+3 → "GMT-03.00" // note that _TZ_ TZIDs have inverse polarity!
18471857
* Etc/Unknown → "GMT+07:00" // if the offset is known
1858+
* Etc/Unknown → "GMT+?" // if the offset is not known
18481859

18491860
**Note:** The digits should be whatever are appropriate for the locale used to format the time zone, not necessarily from the western digits, 0..9. For example, they might be from ०..९.
18501861

docs/site/translation/time-zones-and-city-names.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ The following special patterns are used in formatting timezones.
3434
|---|---|---|---|---|
3535
| gmtFormat | GMT{0}<br /> *or*<br /> GMT{ HOURS_FROM_GMT } | GMT -2:00 | **GMT Pattern.** Modify this field if the format for GMT time uses different letters, such as HUA+0200 for GMT+02:00 , or if the letters GMT occur after the time. Make sure you include the {0} ; that is where the actual time value will go! | |
3636
| gmtZeroFormat | GMT | GMT | **GMT Zero Pattern.** *This field must be consistent with the GMT Pattern.* | |
37+
| gmtUnknownFormat | GMT+? | GMT+? | **GMT Unknown Pattern.** *This field must be consistent with the GMT Pattern.* | |
3738
| hourFormat | +HH:mm;-HH:mm | GMT -02:00 | **GMT Hours Pattern.** This field controls the format for the time used with the GMT Pattern. It contains two patterns separated by a ";". The first controls positive time values (and zero), and the second controls the negative values. So to get *GMT+02.00* for positive values, and *GMT-02.00* for negative values, you'd use *+HH.mm;-HH.mm*. | |
3839
| regionFormat | {0} Time<br /> *or*<br /> { COUNTRY } Time / { CITY } Time | Bolivia Time | **Location-Based Time Zone Pattern.** For generic references to time zones, the country is used if possible, composed with a pattern that in English appears as "{0} **Time** ". Thus a time zone may appear as "Malaysia **Time** " or " **Hora de** Malasia". If the country has multiple time zones, then a city is used to distinguish which one, thus "Argentina (La Rioja) **Time** ".<br /><br /> Some languages would normally have grammatical adjustments depending on what the name of the city is. For example, one might need "12:43 pm **Tempo d'** Australia" but "12:43 pm **Tempo de** Paris". In that case, there are two approaches:<br /><br /> 1. Use "{0}", which will give results like "12:43 pm Australia" and "12:43 pm Paris", or<br /> 2. Use a "form-style" phrasing such as " **Tempo de:** {0}", which will give results like "12:43 pm **Tempo de:** Australia" and "12:43 pm **Tempo de:** Paris". | |
3940
| regionFormat-standard | {0} Standard Time<br /> *or*<br /> { COUNTRY } Standard Time / { CITY } Standard Time | Bolivia Standard Time | | |

tools/cldr-code/src/main/java/org/unicode/cldr/icu/LDMLConstants.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ public class LDMLConstants {
9191
public static final String HOURS_FORMAT = "hoursFormat";
9292
public static final String GMT_FORMAT = "gmtFormat";
9393
public static final String GMT_ZERO_FORMAT = "gmtZeroFormat";
94+
public static final String GMT_UNKNOWN_FORMAT = "gmtUnknownFormat";
9495
public static final String REGION_FORMAT = "regionFormat";
9596
public static final String FALLBACK_FORMAT = "fallbackFormat";
9697
public static final String ABBREVIATION_FALLBACK = "abbreviationFallback";

tools/cldr-code/src/main/java/org/unicode/cldr/test/CheckForCopy.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public CheckForCopy(Factory factory) {
2828
+ "|intervalFormatItem"
2929
+ "|exemplarCharacters\\[@type=\"(currencySymbol|index)\"]"
3030
+ "|scientificFormat"
31-
+ "|timeZoneNames/(hourFormat|gmtFormat|gmtZeroFormat)"
31+
+ "|timeZoneNames/(hourFormat|gmtFormat|gmtZeroFormat|gmtUnknownFormat)"
3232
+ "|dayPeriod"
3333
+ "|(monthWidth|dayWidth|quarterWidth)\\[@type=\"(narrow|abbreviated)\"]"
3434
+ "|exemplarCity"

tools/cldr-code/src/main/java/org/unicode/cldr/test/CheckForExemplars.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,11 +402,14 @@ public CheckCLDR handleCheck(
402402
result);
403403
}
404404
}
405-
} else if (path.contains("/gmtFormat") || path.contains("/gmtZeroFormat")) {
405+
} else if (path.contains("/gmtFormat")
406+
|| path.contains("/gmtZeroFormat")
407+
|| path.contains("/gmtUnknownFormat")) {
406408
if (null
407409
!= (disallowed =
408410
containsAllCountingParens(exemplars, exemplarsPlusAscii, value))) {
409-
disallowed.removeAll(LETTER); // Allow ASCII A-Z in gmtFormat and gmtZeroFormat
411+
disallowed.removeAll(
412+
LETTER); // Allow ASCII A-Z in gmtFormat, gmtZeroFormat, gmtUnknownFormat
410413
if (disallowed.size() > 0) {
411414
addMissingMessage(
412415
disallowed,

0 commit comments

Comments
 (0)