Temporal: Don't convert relativeTo to PlainDate twice in Duration.compare

This commit is contained in:
Philip Chimento 2023-03-03 15:34:29 -08:00 committed by Ms2ger
parent 0a6341de65
commit 008b97932b
1 changed files with 3 additions and 4 deletions

View File

@ -353,16 +353,15 @@ actual.splice(0); // clear
const expectedOpsForDayBalancing = expectedOpsForZonedRelativeTo.concat(
expectedOpsForCalculateOffsetShift,
[
// UnbalanceDurationRelative
"get options.relativeTo.timeZone.getOffsetNanosecondsFor", // 7.a ToTemporalDate
// ToTemporalDate
"get options.relativeTo.timeZone.getOffsetNanosecondsFor",
"call options.relativeTo.timeZone.getOffsetNanosecondsFor",
// UnbalanceDurationRelative
"get options.relativeTo.calendar.dateAdd", // 11.a.ii
"call options.relativeTo.calendar.dateAdd", // 11.a.iii.1 MoveRelativeDate
"call options.relativeTo.calendar.dateAdd", // 11.a.iv.1 MoveRelativeDate
"call options.relativeTo.calendar.dateAdd", // 11.a.v.1 MoveRelativeDate
// UnbalanceDurationRelative again for the second argument:
"get options.relativeTo.timeZone.getOffsetNanosecondsFor", // 7.a ToTemporalDate
"call options.relativeTo.timeZone.getOffsetNanosecondsFor",
"get options.relativeTo.calendar.dateAdd", // 11.a.ii
"call options.relativeTo.calendar.dateAdd", // 11.a.iii.1 MoveRelativeDate
"call options.relativeTo.calendar.dateAdd", // 11.a.iv.1 MoveRelativeDate