-
Notifications
You must be signed in to change notification settings - Fork 172
Editorial: Month code improvements #3144
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
Conversation
Noticed that this didn't use the saved RangeErrorCtor as is should have.
This name matches the spec text.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3144 +/- ##
==========================================
+ Coverage 96.78% 96.82% +0.04%
==========================================
Files 21 22 +1
Lines 10002 9995 -7
Branches 1830 1819 -11
==========================================
- Hits 9680 9678 -2
+ Misses 276 270 -6
- Partials 46 47 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
👍
e10f046
to
a03d53b
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.
👍
These operations are used in the Intl Era Monthcode proposal. They are also already useful in Temporal, so introduce them here. Co-Authored-By: Shane F. Carr <[email protected]>
The polyfill already contained two functions that were doing essentially the same things, so rename them. However they were also doing duplicated work of validation that was already done in ToMonthCode, so eliminate that duplication. This simplifies the calendar code a little bit.
Similar to "calendar type" strings, we introduce "month code" strings which are syntactically valid month codes. Move the description of month code syntax out of the table and into its own clause.
a03d53b
to
01f92d8
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.
I feel like if we go down this path, the month code
type in the spec should be the Record, and we have an AO to convert the record to a string. But, I'm okay with this intermediate approach where month code
is a valid month code string, but we seem to be inconsistent about it.
Yep, I feel the same way. But I also reached the same conclusion that this is OK as an intermediate approach. |
Co-Authored-By: Richard Gibson <[email protected]>
Co-Authored-By: Richard Gibson <[email protected]>
01f92d8
to
8d072d5
Compare
Adds an official definition of month code (so that it can be used as a parameter type) and a few month code-related operations, following on from discussion in tc39/proposal-intl-era-monthcode#69.