Skip to content

Commit 8889471

Browse files
Remove generic metazone values that match location values (#5751)
-100KB Generic non-location format ("Central European Time", "Armenia Time") falls back to location ("Zurich Time", "Armenia Time"), so we can remove duplicates. There are some entries that I feel should be deduplicated, but aren't (metazone name listed first): * The metazone name is more specific than the location name. This is weird, because for the location format, the [region should be used if there's only one time zone in the country](https://www.unicode.org/reports/tr35/tr35-dates.html#Contents:~:text=From%20the%20TZDB%20get%20the%20country%20code%20for%20the%20zone%2C%20and%20determine%20whether%20there%20is%20only%20one%20timezone%20in%20the%20country.%20If%20there%20is%20only%20one%20timezone%20or%20if%20the%20zone%20id%20is%20in%20the%20%3CprimaryZones%3E%20list%2C%20format%20the%20country%20name%20with%20the%20regionFormat%2C%20and%20return%20it.). We do this, but then the metazone exists and reverts that * `Apia Time` vs `Samoa Time` * `Pyongyang Time` vs `North Korea Time` * `Taipei Time` vs `Taiwan Time` * `Petropavlovsk-Kamchatski Time` vs `Kamchatka Time` * The generic meta zone includes "standard". This is a data issue, the problem is probably that for non-DST metazones, the only entry is `standard`, which might confuse linguists: * `Guam Standard Time` vs `Guam Time` * `Singapore Standard Time` vs `Singapore Time` * The match is not perfect. Some of this data definitely needs to be cleaned up, but others might be fixed by using a different region display name in datagen. * `Brunei Darussalam Time` vs `Brunei Time` * `Cocos Islands Time` vs `Cocos (Keeling) Islands Time` * `Dumont-d’Urville Time` vs `Dumont d’Urville Time` * `East Timor Time` vs `Timor-Leste Time` * `Easter Island Time` vs `Easter Time` * `Fernando de Noronha Time` vs `Noronha Time` * `French Southern & Antarctic Time` vs `French Southern Territories Time` * `Hong Kong Time` vs `Hong Kong SAR China Time` * `Indian Ocean Time` vs `British Indian Ocean Territory Time` * `Lanka Time` vs `Sri Lanka Time` * `Macao Time` vs `Macao SAR China Time` * `Myanmar Time` vs `Myanmar (Burma) Time` * `North Mariana Islands Time` vs `Northern Mariana Islands Time` * `Philippine Time` vs `Philippines Time` * `Pitcairn Time` vs `Pitcairn Islands Time` * `Ponape Time` vs `Pohnpei Time` * `South Georgia Time` vs `South Georgia & South Sandwich Islands Time` * `Wake Island Time` vs `Wake Time`
1 parent 7feeacd commit 8889471

40 files changed

+967
-1692
lines changed

components/datetime/src/format/neo.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1094,7 +1094,7 @@ impl<C: CldrCalendar, R: DateTimeNamesMarker> TypedDateTimeNames<C, R> {
10941094
///
10951095
/// assert_try_writeable_eq!(
10961096
/// names.with_pattern(&pattern).format(&zone_london_winter),
1097-
/// "Your time zone is: United Kingdom Time",
1097+
/// "Your time zone is: UK Time",
10981098
/// );
10991099
/// ```
11001100
#[cfg(feature = "compiled_data")]

components/datetime/tests/patterns/tests/time_zones.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@
214214
"configs": [
215215
"GenericLocation"
216216
],
217-
"expected": ["United Kingdom Time"]
217+
"expected": ["UK Time"]
218218
},
219219
{
220220
"patterns": [],

provider/data/datetime/data/locations_v1_marker.rs.data

+174-174
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

provider/data/datetime/data/metazone_generic_names_long_v1_marker.rs.data

+164-94
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

provider/data/datetime/fingerprints.csv

+289-267
Large diffs are not rendered by default.

provider/source/data/debug/time_zone/generic_long@1/ar-EG.json

-57
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

provider/source/data/debug/time_zone/generic_long@1/ar.json

-57
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)