Open anba opened 1 week ago
@anba Are you sure it already has test coverage? I tried adding the assertion steps to the polyfill, and got no new test failures. Which ones fail on your end?
After updating more code to match the current spec text, the assertions no longer trigger. So you're correct, this is missing test262 coverage.
Edit: Forgot to reenable the test262 tests which were failing because of this missing check. 😅
This is covered by
When the input is "-271821-04-19"
, this step:
Let isoDateTime be CombineISODateAndTimeRecord(plainRelativeTo.[[ISODate]], MidnightTimeRecord()).
creates a date-time valid outside the valid ISO date-time valids, because the time part is midnight.
Temporal.Duration.prototype.round, steps 27.f-h:
Temporal.Duration.prototype.total, steps 12.f-h:
isoDateTime
andtargetDateTime
can be be outside the valid date-time limits, which breaks assertions inDifferencePlainDateTimeWithRounding
andDifferencePlainDateTimeWithTotal
when callingDifferenceISODateTime
.(This is already covered by test262 tests, but probably didn't get noticed because the polyfill doesn't implement the assertion steps.)