Skip to content

PlainYearMonth parsing and Calendar field resolution cleanup/fixes #205

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

Merged
merged 2 commits into from
Feb 23, 2025

Conversation

nekevss
Copy link
Member

@nekevss nekevss commented Feb 22, 2025

This PR fixes some issues with handling PlainYearMonth's calendar field resolution as well as aligning PlainYearMonth::new_with_overflow closer to the specification behavior.

This PR does introduce a new internal API IsoDate::regulate, which does the regulation work without any date/time limit validations (year month has its own year_month_within_limits validation).

Tested on Boa locally, this does increase Temporal.PlainYearMonth.from conformance to near 100%. The remaining tests are related to other known issues: minus sign parsing and MonthCode validation.

@nekevss nekevss added the C-bug Something isn't working label Feb 22, 2025
Copy link
Member

@raskad raskad left a comment

Choose a reason for hiding this comment

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

Looks good, good to add the edge case tests

@nekevss nekevss merged commit 25d45b2 into main Feb 23, 2025
7 checks passed
@nekevss nekevss deleted the ym-from-str branch February 23, 2025 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants