Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Normative: Reject too large dates in ToTemporalMonthDay #3054

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

anba
Copy link
Contributor

@anba anba commented Dec 9, 2024

Follow-up to #3008 / #3002 to reject too large dates.

anba added 3 commits December 9, 2024 11:40
Follow-up to tc39#3008 (tc39#3002). Similar to CalendarMonthDayToISOReferenceDate, also
don't require support for mapping ISO dates up to ±999999-12-31 to
calendar dates. This restriction does not apply to the ISO 8601
calendar.
Move the CreateISODateRecord call in ToTemporalYearMonth after
processing the options to match the steps in ToTemporalMonthDay,
ToTemporalDate, and ToTemporalDateTime.
…earMonth

The call to `CalendarYearMonthFromFields` will already reject too large
dates, but adding an explicit step makes it more obvious that
`ISODateToFields` doesn't require support for mapping large ISO dates to
calendar dates. And it also aligns `ToTemporalYearMonth` with
`ToTemporalMonthDay`.
Copy link

codecov bot commented Dec 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.73%. Comparing base (6800295) to head (3ce9a20).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3054   +/-   ##
=======================================
  Coverage   95.73%   95.73%           
=======================================
  Files          21       21           
  Lines        9716     9716           
  Branches     1742     1742           
=======================================
  Hits         9302     9302           
  Misses        363      363           
  Partials       51       51           

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

@ptomato
Copy link
Collaborator

ptomato commented Dec 11, 2024

Thanks. We'll discuss this in the next champions meeting.

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

Successfully merging this pull request may close these issues.

2 participants