diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:43:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:43:14 +0000 |
commit | 8dd16259287f58f9273002717ec4d27e97127719 (patch) | |
tree | 3863e62a53829a84037444beab3abd4ed9dfc7d0 /js/src/tests/test262/intl402/DurationFormat/prototype/format/numeric-hour-with-zero-minutes-and-non-zero-seconds.js | |
parent | Releasing progress-linux version 126.0.1-1~progress7.99u1. (diff) | |
download | firefox-8dd16259287f58f9273002717ec4d27e97127719.tar.xz firefox-8dd16259287f58f9273002717ec4d27e97127719.zip |
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'js/src/tests/test262/intl402/DurationFormat/prototype/format/numeric-hour-with-zero-minutes-and-non-zero-seconds.js')
-rw-r--r-- | js/src/tests/test262/intl402/DurationFormat/prototype/format/numeric-hour-with-zero-minutes-and-non-zero-seconds.js | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/js/src/tests/test262/intl402/DurationFormat/prototype/format/numeric-hour-with-zero-minutes-and-non-zero-seconds.js b/js/src/tests/test262/intl402/DurationFormat/prototype/format/numeric-hour-with-zero-minutes-and-non-zero-seconds.js index dc5ad4ea84..3c37afa1b4 100644 --- a/js/src/tests/test262/intl402/DurationFormat/prototype/format/numeric-hour-with-zero-minutes-and-non-zero-seconds.js +++ b/js/src/tests/test262/intl402/DurationFormat/prototype/format/numeric-hour-with-zero-minutes-and-non-zero-seconds.js @@ -5,8 +5,8 @@ /*--- esid: sec-Intl.DurationFormat.prototype.format description: > - The correct separator is used for numeric hours with zero minutes and non-zero seconds. -locale: [en-US] + Minutes with numeric or 2-digit style are included in the output when between displayed hours and seconds, even when the minutes value is zero. +locale: [en] features: [Intl.DurationFormat] ---*/ @@ -15,30 +15,18 @@ const df = new Intl.DurationFormat("en", { hours: "numeric", }); -const lf = new Intl.ListFormat("en", { - type: "unit", - style: "short", -}); - const duration = { hours: 1, - - // Minutes is omitted from the output when its value is zero. minutes: 0, - - // Either seconds or sub-seconds must be non-zero. seconds: 3, }; -const expected = lf.format([ - new Intl.NumberFormat("en", {minimumIntegerDigits: 1}).format(duration.hours), - new Intl.NumberFormat("en", {minimumIntegerDigits: 2}).format(duration.seconds), -]); +const expected = "1:00:03" assert.sameValue( df.format(duration), expected, - `No time separator is used when minutes is zero` + `Minutes always displayed when between displayed hours and seconds, even if minutes is 0` ); reportCompare(0, 0); |