-
Notifications
You must be signed in to change notification settings - Fork 737
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
DateTime tokenParse test ex16 failing on Node 22.2.0 #1675
Comments
It appears that Node 22 has changed how it formats the meridiem (AM/PM): console.log(
new Date('2019-04-03T12:26:07.000+05:30').toLocaleString('kn', {
hour: '2-digit', minute: '2-digit', hour12: true,
numberingSystem: 'knda'
})
); In Node 22 this outputs I'm going to try and find out more info about whether this is an intentional change on Node's side, if ICU data has changed or what happened here. |
This is a change that happened in CLDR, which is where Node (and pretty much everything) get's its locale data. I'll look into making a pull request to make the test pass, but there is not really anything Luxon can do about the value changing. |
@diesieben07 On the one hand, this looks intentional: just ICU translating AM and PM into Kanada. But on the other hand...it also seems incorrect; "ಪೂರ್ವಾಹ್ನ" apparently means PM, and here it should be AM? Also, usages I've found put the meridiem before the time. This maybe a little half-baked from the ICU, and we're sort of caught in the middle. I suspect if we fix the test, we'll just have to fix it again due to incremental fixes to ICU. Maybe we can just change the language the test uses? Or perhaps we don't need this one at all? |
Hey guys thanks for checking this out. Anyway not a big deal, I just wanted to warn you that when you would switch to 22 you would probably get the error. Thanks EDIT I tested and this works fine. Should allow keeping the test (so at least a basic testing of that locale/numbering) and make it work on every version of Node.
|
Describe the bug
The following test fails, cause there's no match
To Reproduce
Just run the test
"DateTime.fromFormatExplain() parses localized string with numberingSystem correctly"
using Node 22.2.0Actual vs Expected behavior
The test fails with "expected Array, was null"
Desktop (please complete the following information):
Additional context
Nothing to add so far
The text was updated successfully, but these errors were encountered: