Skip to content

Conversation

@ptomato
Copy link
Collaborator

@ptomato ptomato commented Dec 6, 2025

This updates the pinned test262 commit and makes the necessary fixes in the reference polyfill for the tests to pass. (Also fixes a straggler from #3175.)

…sion

In the iterative guessing process of converting a calendar date to an
ISO date, we can run afoul of the supported range when either of two
things happen:

- A calendar helper's estimateISODate() returns an estimate of 01-01 of
  whatever year, which may be -271821
- diffTotalDaysEstimate is positive and takes us past the end of the
  range

In the places where either of these two things happen, clamp the ISO
date to the supported range.

It's possible there are other places that could error, but I haven't
been able to find cases that would make them do so.
See the change in #3175
for details. `era` should not be added to the default options for
PlainMonthDay, because [[era]] isn't copied in step 12.b of
GetDateTimeFormat when defaults is MONTH-DAY.

The spec is correct here, this brings the reference code into alignment
with it.
@ptomato ptomato force-pushed the more-polyfill-fixes branch from 11ddb9d to e0c68e2 Compare December 6, 2025 01:32
@codecov
Copy link

codecov bot commented Dec 6, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.75%. Comparing base (2cee76a) to head (e0c68e2).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3199      +/-   ##
==========================================
+ Coverage   96.74%   96.75%   +0.01%     
==========================================
  Files          22       22              
  Lines       10348    10359      +11     
  Branches     1859     1863       +4     
==========================================
+ Hits        10011    10023      +12     
+ Misses        287      285       -2     
- Partials       50       51       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants