diff --git a/test/built-ins/Temporal/Duration/prototype/round/order-of-operations.js b/test/built-ins/Temporal/Duration/prototype/round/order-of-operations.js index 732dded858..6c88894c66 100644 --- a/test/built-ins/Temporal/Duration/prototype/round/order-of-operations.js +++ b/test/built-ins/Temporal/Duration/prototype/round/order-of-operations.js @@ -327,9 +327,6 @@ const expectedOpsForZonedRelativeTo = [ "get options.smallestUnit", "get options.smallestUnit.toString", "call options.smallestUnit.toString", - // RoundDuration → ToTemporalDate - "get options.relativeTo.timeZone.getOffsetNanosecondsFor", - "call options.relativeTo.timeZone.getOffsetNanosecondsFor", ]; const zonedRelativeTo = TemporalHelpers.propertyBagObserver(actual, { @@ -376,6 +373,9 @@ const expectedOpsForYearRoundingZoned = expectedOpsForZonedRelativeTo.concat([ "call options.relativeTo.calendar.dateAdd", "get options.relativeTo.timeZone.getPossibleInstantsFor", // 10. GetInstantFor "call options.relativeTo.timeZone.getPossibleInstantsFor", + // ToTemporalDate + "get options.relativeTo.timeZone.getOffsetNanosecondsFor", + "call options.relativeTo.timeZone.getOffsetNanosecondsFor", "get options.relativeTo.calendar.dateAdd", // 9.b "call options.relativeTo.calendar.dateAdd", // 9.c "call options.relativeTo.calendar.dateAdd", // 9.e diff --git a/test/built-ins/Temporal/Duration/prototype/round/relativeto-zoneddatetime-nanoseconds-to-days-range-errors.js b/test/built-ins/Temporal/Duration/prototype/round/relativeto-zoneddatetime-nanoseconds-to-days-range-errors.js index cf6f0219c6..08d50e8456 100644 --- a/test/built-ins/Temporal/Duration/prototype/round/relativeto-zoneddatetime-nanoseconds-to-days-range-errors.js +++ b/test/built-ins/Temporal/Duration/prototype/round/relativeto-zoneddatetime-nanoseconds-to-days-range-errors.js @@ -43,7 +43,6 @@ let zdt = new Temporal.ZonedDateTime( timeZoneSubstituteValues( [[epochInstant]], // Returned for NanosecondsToDays step 14, setting _intermediateNs_ [ - 0, // Returned for RoundDuration step 6.c.i, setting _intermediate_ - making _startNs_ 0 in NanosecondsToDays dayNs - 1, // Returned for NanosecondsToDays step 7, setting _startDateTime_ -dayNs + 1, // Returned for NanosecondsToDays step 11, setting _endDateTime_ ] @@ -64,7 +63,6 @@ zdt = new Temporal.ZonedDateTime( timeZoneSubstituteValues( [[epochInstant]], // Returned for NanosecondsToDays step 14, setting _intermediateNs_ [ - 0, // Returned for RoundDuration step 6.c.i, setting _intermediate_ - making _startNs_ 0 in NanosecondsToDays -dayNs + 1, // Returned for NanosecondsToDays step 7, setting _startDateTime_ dayNs - 1, // Returned for NanosecondsToDays step 11, setting _endDateTime_ ] @@ -88,7 +86,6 @@ zdt = new Temporal.ZonedDateTime( [new Temporal.Instant(-4n)], // Returned for NanosecondsToDays step 18.a, setting _oneDayFartherNs_ ], [ - 0, // Returned for RoundDuration step 6.c.i, setting _intermediate_ - making _startNs_ 0 in NanosecondsToDays dayNs - 1, // Returned for NanosecondsToDays step 7, setting _startDateTime_ -dayNs + 1, // Returned for NanosecondsToDays step 11, setting _endDateTime_ ] diff --git a/test/built-ins/Temporal/Duration/prototype/total/order-of-operations.js b/test/built-ins/Temporal/Duration/prototype/total/order-of-operations.js index 45b550f0bd..a0addeed0c 100644 --- a/test/built-ins/Temporal/Duration/prototype/total/order-of-operations.js +++ b/test/built-ins/Temporal/Duration/prototype/total/order-of-operations.js @@ -255,14 +255,7 @@ const zonedRelativeTo = TemporalHelpers.propertyBagObserver(actual, { // basic order of observable operations, without rounding: instance.total(createOptionsObserver({ unit: "nanoseconds", relativeTo: zonedRelativeTo })); -assert.compareArray( - actual, - expectedOpsForZonedRelativeTo.concat([ - // RoundDuration → ToTemporalDate - "get options.relativeTo.timeZone.getOffsetNanosecondsFor", - "call options.relativeTo.timeZone.getOffsetNanosecondsFor", - ]), - "order of operations for ZonedDateTime relativeTo"); +assert.compareArray(actual, expectedOpsForZonedRelativeTo, "order of operations for ZonedDateTime relativeTo"); actual.splice(0); // clear const expectedOpsForYearRoundingZoned = expectedOpsForZonedRelativeTo.concat([ @@ -288,9 +281,6 @@ const expectedOpsForYearRoundingZoned = expectedOpsForZonedRelativeTo.concat([ "get options.relativeTo.timeZone.getPossibleInstantsFor", // 10. GetInstantFor "call options.relativeTo.timeZone.getPossibleInstantsFor", ], [ - // ToTemporalDate - "get options.relativeTo.timeZone.getOffsetNanosecondsFor", - "call options.relativeTo.timeZone.getOffsetNanosecondsFor", // code path through RoundDuration that rounds to the nearest year: // MoveRelativeZonedDateTime → AddZonedDateTime "get options.relativeTo.timeZone.getOffsetNanosecondsFor", // 5. GetPlainDateTimeFor @@ -299,6 +289,9 @@ const expectedOpsForYearRoundingZoned = expectedOpsForZonedRelativeTo.concat([ "call options.relativeTo.calendar.dateAdd", "get options.relativeTo.timeZone.getPossibleInstantsFor", // 10. GetInstantFor "call options.relativeTo.timeZone.getPossibleInstantsFor", + // ToTemporalDate + "get options.relativeTo.timeZone.getOffsetNanosecondsFor", + "call options.relativeTo.timeZone.getOffsetNanosecondsFor", "get options.relativeTo.calendar.dateAdd", // 9.b "call options.relativeTo.calendar.dateAdd", // 9.c "call options.relativeTo.calendar.dateAdd", // 9.e diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/since/order-of-operations.js b/test/built-ins/Temporal/ZonedDateTime/prototype/since/order-of-operations.js index 55352a7426..2c4e6c1bb0 100644 --- a/test/built-ins/Temporal/ZonedDateTime/prototype/since/order-of-operations.js +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/since/order-of-operations.js @@ -189,9 +189,6 @@ const expectedOpsForCalendarDifference = [ ]; const expectedOpsForCalendarRounding = [ - // RoundDuration → ToTemporalDate - "get this.timeZone.getOffsetNanosecondsFor", - "call this.timeZone.getOffsetNanosecondsFor", // RoundDuration → MoveRelativeZonedDateTime → AddZonedDateTime "get this.timeZone.getOffsetNanosecondsFor", "call this.timeZone.getOffsetNanosecondsFor", @@ -214,6 +211,9 @@ const expectedOpsForCalendarRounding = [ "call this.calendar.dateAdd", "get this.timeZone.getPossibleInstantsFor", "call this.timeZone.getPossibleInstantsFor", + // RoundDuration → ToTemporalDate + "get this.timeZone.getOffsetNanosecondsFor", + "call this.timeZone.getOffsetNanosecondsFor", ]; // code path that skips RoundDuration: diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/until/order-of-operations.js b/test/built-ins/Temporal/ZonedDateTime/prototype/until/order-of-operations.js index 04d5514e55..2b1bb34d33 100644 --- a/test/built-ins/Temporal/ZonedDateTime/prototype/until/order-of-operations.js +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/until/order-of-operations.js @@ -189,9 +189,6 @@ const expectedOpsForCalendarDifference = [ ]; const expectedOpsForCalendarRounding = [ - // RoundDuration → ToTemporalDate - "get this.timeZone.getOffsetNanosecondsFor", - "call this.timeZone.getOffsetNanosecondsFor", // RoundDuration → MoveRelativeZonedDateTime → AddZonedDateTime "get this.timeZone.getOffsetNanosecondsFor", "call this.timeZone.getOffsetNanosecondsFor", @@ -214,6 +211,9 @@ const expectedOpsForCalendarRounding = [ "call this.calendar.dateAdd", "get this.timeZone.getPossibleInstantsFor", "call this.timeZone.getPossibleInstantsFor", + // RoundDuration → ToTemporalDate + "get this.timeZone.getOffsetNanosecondsFor", + "call this.timeZone.getOffsetNanosecondsFor", ]; // code path that skips RoundDuration: