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

Editorial: Make explicit that ToTemporalYearMonth rejects too-large ISO year strings #3083

Merged
merged 3 commits into from
Feb 5, 2025

Conversation

ptomato
Copy link
Collaborator

@ptomato ptomato commented Feb 5, 2025

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 after #3054.

Taken from @anba's PR #3054, this is the editorial/unobservable part.

anba and others added 3 commits February 4, 2025 17:09
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` after #3054.
This change is not observable, but updating the reference code will help
to confirm that.
Copy link

codecov bot commented Feb 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.37%. Comparing base (1b1fd9f) to head (6e25339).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3083   +/-   ##
=======================================
  Coverage   96.37%   96.37%           
=======================================
  Files          21       21           
  Lines        9872     9874    +2     
  Branches     1800     1800           
=======================================
+ Hits         9514     9516    +2     
  Misses        311      311           
  Partials       47       47           

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

Copy link
Collaborator

@Ms2ger Ms2ger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this makes sense to me.

@Ms2ger Ms2ger merged commit 25224a0 into main Feb 5, 2025
10 checks passed
@Ms2ger Ms2ger deleted the to-year-month-editorial-change branch February 5, 2025 15:19
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.

3 participants