summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/staging/Temporal/ZonedDateTime/old/round.js
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:43:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:43:14 +0000
commit8dd16259287f58f9273002717ec4d27e97127719 (patch)
tree3863e62a53829a84037444beab3abd4ed9dfc7d0 /js/src/tests/test262/staging/Temporal/ZonedDateTime/old/round.js
parentReleasing progress-linux version 126.0.1-1~progress7.99u1. (diff)
downloadfirefox-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/staging/Temporal/ZonedDateTime/old/round.js')
-rw-r--r--js/src/tests/test262/staging/Temporal/ZonedDateTime/old/round.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/js/src/tests/test262/staging/Temporal/ZonedDateTime/old/round.js b/js/src/tests/test262/staging/Temporal/ZonedDateTime/old/round.js
index 3dfb21989d..6c613fa47b 100644
--- a/js/src/tests/test262/staging/Temporal/ZonedDateTime/old/round.js
+++ b/js/src/tests/test262/staging/Temporal/ZonedDateTime/old/round.js
@@ -217,17 +217,19 @@ var bal = Temporal.ZonedDateTime.from("1976-11-18T23:59:59.999999999+01:00[+01:0
var timeZone = TemporalHelpers.springForwardFallBackTimeZone();
// rounds correctly to a 25-hour day
+// (the 12.5 hour is the halfway point, which is 11:30 local time, since 2:00-2:59 repeats)
var roundTo = { smallestUnit: "day" };
-var roundMeDown = Temporal.PlainDateTime.from("2000-10-29T12:29:59").toZonedDateTime(timeZone);
+var roundMeDown = Temporal.PlainDateTime.from("2000-10-29T11:29:59").toZonedDateTime(timeZone);
assert.sameValue(`${ roundMeDown.round(roundTo) }`, "2000-10-29T00:00:00-07:00[Custom/Spring_Fall]");
-var roundMeUp = Temporal.PlainDateTime.from("2000-10-29T12:30:01").toZonedDateTime(timeZone);
+var roundMeUp = Temporal.PlainDateTime.from("2000-10-29T11:30:01").toZonedDateTime(timeZone);
assert.sameValue(`${ roundMeUp.round(roundTo) }`, "2000-10-30T00:00:00-08:00[Custom/Spring_Fall]");
// rounds correctly to a 23-hour day
+// (the 11.5 hour is the halfway point, which is 12:30 local time, since 2:00-2:59 skips)
var roundTo = { smallestUnit: "day" };
-var roundMeDown = Temporal.PlainDateTime.from("2000-04-02T11:29:59").toZonedDateTime(timeZone);
+var roundMeDown = Temporal.PlainDateTime.from("2000-04-02T12:29:59").toZonedDateTime(timeZone);
assert.sameValue(`${ roundMeDown.round(roundTo) }`, "2000-04-02T00:00:00-08:00[Custom/Spring_Fall]");
-var roundMeUp = Temporal.PlainDateTime.from("2000-04-02T11:30:01").toZonedDateTime(timeZone);
+var roundMeUp = Temporal.PlainDateTime.from("2000-04-02T12:30:01").toZonedDateTime(timeZone);
assert.sameValue(`${ roundMeUp.round(roundTo) }`, "2000-04-03T00:00:00-07:00[Custom/Spring_Fall]");
// rounding up to a nonexistent wall-clock time