Skip to content

Commit

Permalink
Remove generic metazone values that match location values (#5751)
Browse files Browse the repository at this point in the history
-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`
  • Loading branch information
robertbastian authored Oct 30, 2024
1 parent 7feeacd commit 8889471
Show file tree
Hide file tree
Showing 40 changed files with 967 additions and 1,692 deletions.
2 changes: 1 addition & 1 deletion components/datetime/src/format/neo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1094,7 +1094,7 @@ impl<C: CldrCalendar, R: DateTimeNamesMarker> TypedDateTimeNames<C, R> {
///
/// assert_try_writeable_eq!(
/// names.with_pattern(&pattern).format(&zone_london_winter),
/// "Your time zone is: United Kingdom Time",
/// "Your time zone is: UK Time",
/// );
/// ```
#[cfg(feature = "compiled_data")]
Expand Down
2 changes: 1 addition & 1 deletion components/datetime/tests/patterns/tests/time_zones.json
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@
"configs": [
"GenericLocation"
],
"expected": ["United Kingdom Time"]
"expected": ["UK Time"]
},
{
"patterns": [],
Expand Down
348 changes: 174 additions & 174 deletions provider/data/datetime/data/locations_v1_marker.rs.data

Large diffs are not rendered by default.

Large diffs are not rendered by default.

556 changes: 289 additions & 267 deletions provider/data/datetime/fingerprints.csv

Large diffs are not rendered by default.

57 changes: 0 additions & 57 deletions provider/source/data/debug/time_zone/generic_long@1/ar-EG.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

57 changes: 0 additions & 57 deletions provider/source/data/debug/time_zone/generic_long@1/ar.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 8889471

Please sign in to comment.