Skip to content

Commit

Permalink
ZZZZ is a long format (#5685)
Browse files Browse the repository at this point in the history
  • Loading branch information
robertbastian authored Oct 15, 2024
1 parent 3a95556 commit f864a56
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
4 changes: 2 additions & 2 deletions components/datetime/src/format/datetime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -609,13 +609,13 @@ fn select_zone_units(time_zone: ResolvedNeoTimeZoneSkeleton) -> [Option<TimeZone
ResolvedNeoTimeZoneSkeleton::Location => {
[Some(TimeZoneFormatterUnit::GenericLocation), None, None]
}
// `O`, `ZZZZ`
// `O`
ResolvedNeoTimeZoneSkeleton::OffsetShort => [
Some(TimeZoneFormatterUnit::LocalizedOffsetShort),
None,
None,
],
// `OOOO`
// `OOOO`, `ZZZZ`
ResolvedNeoTimeZoneSkeleton::OffsetLong => {
[Some(TimeZoneFormatterUnit::LocalizedOffsetLong), None, None]
}
Expand Down
2 changes: 1 addition & 1 deletion components/datetime/src/tz_registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ macro_rules! time_zone_style_registry {
(SpecificShort, LowerZ, Abbreviated), // 'zzz'
(Isoxxxx, UpperZ, TwoDigit), // 'ZZ'
(Isoxxxx, UpperZ, Abbreviated), // 'ZZZ'
(OffsetShort, UpperZ, Wide), // 'ZZZZ'
(OffsetLong, UpperZ, Wide), // 'ZZZZ'
(Isoxxxx, LowerX, Wide), // 'xxxx'
(IsoXXXXX, UpperX, Narrow), // 'XXXXX'
],
Expand Down
36 changes: 18 additions & 18 deletions components/datetime/tests/patterns/tests/time_zones.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@
},
{
"patterns": [
"O",
"ZZZZ"
"O"
],
"configs": [
"LocalizedOffsetShort"
Expand All @@ -47,7 +46,8 @@
},
{
"patterns": [
"OOOO"
"OOOO",
"ZZZZ"
],
"configs": [
"LocalizedOffsetLong"
Expand Down Expand Up @@ -400,8 +400,7 @@
},
{
"patterns": [
"O",
"ZZZZ"
"O"
],
"configs": [
"LocalizedOffsetShort"
Expand All @@ -411,7 +410,8 @@
},
{
"patterns": [
"OOOO"
"OOOO",
"ZZZZ"
],
"configs": [
"LocalizedOffsetLong"
Expand Down Expand Up @@ -762,8 +762,7 @@
},
{
"patterns": [
"O",
"ZZZZ"
"O"
],
"configs": [
"LocalizedOffsetShort"
Expand All @@ -773,7 +772,8 @@
},
{
"patterns": [
"OOOO"
"OOOO",
"ZZZZ"
],
"configs": [
"LocalizedOffsetLong"
Expand Down Expand Up @@ -906,8 +906,7 @@
},
{
"patterns": [
"O",
"ZZZZ"
"O"
],
"configs": [
"LocalizedOffsetShort"
Expand All @@ -917,7 +916,8 @@
},
{
"patterns": [
"OOOO"
"OOOO",
"ZZZZ"
],
"configs": [
"LocalizedOffsetLong"
Expand Down Expand Up @@ -949,8 +949,7 @@
},
{
"patterns": [
"O",
"ZZZZ"
"O"
],
"configs": [
"LocalizedOffsetShort"
Expand All @@ -960,7 +959,8 @@
},
{
"patterns": [
"OOOO"
"OOOO",
"ZZZZ"
],
"configs": [
"LocalizedOffsetLong"
Expand All @@ -987,7 +987,6 @@
"z",
"zz",
"zzz",
"ZZZZ",
"O"
],
"configs": [],
Expand All @@ -996,7 +995,8 @@
{
"patterns": [
"zzzz",
"OOOO"
"OOOO",
"ZZZZ"
],
"configs": [],
"expected": ["GMT-07:00"]
Expand Down Expand Up @@ -1037,7 +1037,6 @@
"z",
"zz",
"zzz",
"ZZZZ",
"O"
],
"configs": [],
Expand All @@ -1046,6 +1045,7 @@
{
"patterns": [
"zzzz",
"ZZZZ",
"OOOO"
],
"configs": [],
Expand Down

0 comments on commit f864a56

Please sign in to comment.