-
Notifications
You must be signed in to change notification settings - Fork 153
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
Handle number-less DateTimeFormat Hebrew month #2034
Conversation
The ICU formats for the Hebrew calendar no longer output a month number, only the name. This commit works around this change. See https://bugzilla.mozilla.org/show_bug.cgi?id=1751833. Fixes tc39#2015.
Codecov Report
@@ Coverage Diff @@
## main #2034 +/- ##
==========================================
- Coverage 94.44% 94.43% -0.02%
==========================================
Files 19 19
Lines 10989 11002 +13
Branches 1596 1597 +1
==========================================
+ Hits 10379 10390 +11
- Misses 590 592 +2
Partials 20 20
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Can we test this? |
If Node's ICU data is updated to include the problematic change (the same one that Chrome and FF have already picked up) then any property access using the Hebrew calendar will trigger this bug. So it will be tested by CI Demitasse tests (in intl.mjs) as soon as CI is updated to use a version of Node with the latest ICU data. In the meantime, I manually verified it in latest Chrome and latest FF and Chrome. Before the fix in this PR, the following code will throw. After the fix, it won't. Temporal.PlainDate.from('2020-01-01[u-ca=hebrew]').day; Your comment made me realize that Node now has v17, so we should probably be testing it in CI. I'll open a new issue for that. |
BTW, I confirmed that the current (pre-PR) code fails under Node 17 tests. See https://github.com/tc39/proposal-temporal/runs/5069846827?check_suite_focus=true Then I rebased the Node 17 PR (#2039) on top of this PR and verified that Node 17 passes. |
The ICU formats for the Hebrew calendar no longer output a month number, only the name. This PR works around this change. See https://bugzilla.mozilla.org/show_bug.cgi?id=1751833 for more context.
Fixes #2015.