-
Notifications
You must be signed in to change notification settings - Fork 149
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: Treat daysInMonth
as the count of days in a month
#2484
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2484 +/- ##
==========================================
+ Coverage 96.16% 96.17% +0.01%
==========================================
Files 20 20
Lines 11289 11300 +11
Branches 2163 2164 +1
==========================================
+ Hits 10856 10868 +12
Misses 369 369
+ Partials 64 63 -1
|
f405b6a
to
ea6bdd6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! A few minor comments. Looking forward to the docs and non-ISO calendars changes.
6830ad1
to
c4d83ae
Compare
…r of the last day Updates PlainYearMonth arithmetic accordingly and clarifies language around non-ISO calendar operations. Fixes #1315 Co-authored-by: Guillaume Emont <guijemont@igalia.com>
This PR reached consensus in the January 2023 TC39 meeting. |
c4d83ae
to
e604f37
Compare
Is there already an issue created for docs and non-ISO calendars? |
Replaces a use of `ObjectCreate` followed by `CopyDataProperties` with `CopyOptions`. This pattern is used everywhere else in Temporal but was missed in #2484.
Replaces a use of `ObjectCreate` followed by `CopyDataProperties` with `CopyOptions`. This pattern is used everywhere else in Temporal but was missed in #2484.
I had determined along the line somewhere that they didn't seem necessary, but if you see some then please do open an issue. |
…earMonth. r=spidermonkey-reviewers,sfink Implement the changes from <tc39/proposal-temporal#2484>. Differential Revision: https://phabricator.services.mozilla.com/D182049
…earMonth. r=spidermonkey-reviewers,sfink Implement the changes from <tc39/proposal-temporal#2484>. Differential Revision: https://phabricator.services.mozilla.com/D182049
…earMonth. r=spidermonkey-reviewers,sfink Implement the changes from <tc39/proposal-temporal#2484>. Differential Revision: https://phabricator.services.mozilla.com/D182049 UltraBlame original commit: 2aff072a94c4b7ae26778e7308f853ab008bd8e2
…earMonth. r=spidermonkey-reviewers,sfink Implement the changes from <tc39/proposal-temporal#2484>. Differential Revision: https://phabricator.services.mozilla.com/D182049 UltraBlame original commit: 2aff072a94c4b7ae26778e7308f853ab008bd8e2
…earMonth. r=spidermonkey-reviewers,sfink Implement the changes from <tc39/proposal-temporal#2484>. Differential Revision: https://phabricator.services.mozilla.com/D182049 UltraBlame original commit: 2aff072a94c4b7ae26778e7308f853ab008bd8e2
Addresses #1315.
Updates Plain Year Month arithmetic to use a version of
.with({ day: 1 }).add({ months: 1 }).subtract({ days: 1}).day
to get the index of the last day of the month. Chose this over the alternative of.with({ day: 1 }).add({ days: yearMonth.daysInMonth() - 1]}).day
beacuse theGetMethod(calendar, "dateAdd")
can be reduced to one GetMethod.Updates polyfill, no changes needed to non-ISO calendars because there are no skipped days in any of the calendars it implements.
Updates to docs pending, will update PR when ready.
Will prepare separate editorial PR to make language of CalendarDateDaysIn{Week,Month,Year} and CalendarDateMonthsInYear more consistent, but current phrasing is correct - nothing needed to address this.