Skip to content

Commit d1ac325

Browse files
robertbastianSquash Bot
authored andcommitted
CLDR-18236 Add gmtUnknownFormat
See #4296
1 parent 2df2456 commit d1ac325

File tree

17 files changed

+68
-12
lines changed

17 files changed

+68
-12
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
@@ -3189,6 +3189,7 @@ Warnings: All cp values have U+FE0F characters removed. See /annotationsDerived/
31893189
<hourFormat>+HH:mm;-HH:mm</hourFormat>
31903190
<gmtFormat>GMT{0}</gmtFormat>
31913191
<gmtZeroFormat>GMT</gmtZeroFormat>
3192+
<gmtUnknownFormat>GMT+?</gmtUnknownFormat>
31923193
<regionFormat>{0}</regionFormat>
31933194
<regionFormat type="daylight">{0} (+1)</regionFormat>
31943195
<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
@@ -414,6 +414,7 @@ modern //ldml/units/unitLength[@type="long"]/unit[@type="speed-light-speed"]/uni
414414
<coverageLevel value="basic" match="dates/timeZoneNames/fallbackFormat"/>
415415
<coverageLevel value="basic" match="dates/timeZoneNames/gmtFormat"/>
416416
<coverageLevel value="basic" match="dates/timeZoneNames/gmtZeroFormat"/>
417+
<coverageLevel value="basic" match="dates/timeZoneNames/gmtUnknownFormat"/>
417418
<coverageLevel value="basic" match="dates/timeZoneNames/hourFormat"/>
418419
<coverageLevel value="basic" match="dates/timeZoneNames/metazone[@type='GMT']/long/standard"/>
419420

docs/ldml/tr35-dates.md

Lines changed: 12 additions & 3 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>
@@ -1707,12 +1709,18 @@ Note: A generic location format is constructed by a part of time zone ID represe
17071709
* "UTC-3" (short)
17081710
* "Гринуич+03:30" (long)
17091711

1710-
Otherwise (when the offset from GMT is zero, referring to GMT itself) the style specified by the `<gmtZeroFormat>` element is used:
1712+
Otherwise, when the offset from GMT is zero, the style specified by the `<gmtZeroFormat>` element is used:
17111713

17121714
* "GMT"
17131715
* "UTC"
17141716
* "Гринуич"
17151717

1718+
Otherwise (that is, when the offset from GMT is not known), the style specified by the `<gmtUnknownFormat>` element is used:
1719+
1720+
* "GMT+?"
1721+
* "UTC+?"
1722+
* "Гринуич+?"
1723+
17161724
**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.
17171725

17181726
* "-0800" (basic)
@@ -1845,6 +1853,7 @@ Some of the examples are drawn from real data, while others are for illustration
18451853
* America/Los_Angeles → "HMG-07:00" // daylight time
18461854
* Etc/GMT+3 → "GMT-03.00" // note that _TZ_ TZIDs have inverse polarity!
18471855
* Etc/Unknown → "GMT+07:00" // if the offset is known
1856+
* Etc/Unknown → "GMT+?" // if the offset is not known
18481857

18491858
**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 ०..९.
18501859

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
@@ -397,11 +397,14 @@ public CheckCLDR handleCheck(
397397
result);
398398
}
399399
}
400-
} else if (path.contains("/gmtFormat") || path.contains("/gmtZeroFormat")) {
400+
} else if (path.contains("/gmtFormat")
401+
|| path.contains("/gmtZeroFormat")
402+
|| path.contains("/gmtUnknownFormat")) {
401403
if (null
402404
!= (disallowed =
403405
containsAllCountingParens(exemplars, exemplarsPlusAscii, value))) {
404-
disallowed.removeAll(LETTER); // Allow ASCII A-Z in gmtFormat and gmtZeroFormat
406+
disallowed.removeAll(
407+
LETTER); // Allow ASCII A-Z in gmtFormat, gmtZeroFormat, gmtUnknownFormat
405408
if (disallowed.size() > 0) {
406409
addMissingMessage(
407410
disallowed,

0 commit comments

Comments
 (0)