-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
Intl.DateFormat changes output between Node 16.16 and Node 16.17 #44454
Comments
I also noticed
With node 16.17.0
In this case though, Chrome |
cc @nodejs/i18n-api |
Yes, these are linguistic cultural preferred forms and they can and do shift. Best is not to depend on fixed formats. See https://cldr.Unicode.org for more info on the process and delta charts. Will add more details. |
@srl295 Can you point to where in the delta (DTD or tickets) this change appears? As someone who's not used to reading this changelog, it's hard to tell 🙂 Even if not depending on fixed formats, it seems strange to me that the time format for |
@nodejs/i18n-api we should put this in a FAQ…? @ramonsnir try the following:
|
Thank you, @srl295 , I appreciate it! 🙂 I missed a step going through the delta earlier and never even reached the right page. |
@srl295 As mentioned, it's my first time dealing with CLDR so I may be misreading things. From the issues reported above, there were two changes in the format outputs from Node.js:
CLDR version 40 had two date combination formats in English: When using long/full formats, For the second issue, I went to the spec to see the definition of time periods. A change from If I am misunderstanding and wasting your time, tell me and I'll drop it. However, I have a feeling that this change wasn't intended and there's a mistranslation somewhere between CLDR / v8 / Node.js. |
Just to clear up where this change is coming from. The change that this issue is referring to actually comes from ICU, which was updated to v71 in node v16.17.0. You can see that change mentioned in the ICU release notes here: https://icu.unicode.org/download/71#h.z0qyjvmbhu9m |
Just adding a bit from the ECMA-402 point of view: Never depend on the result of a |
Closing this since this has nothing to fix, but feel free to reopen if you disagree. |
💯 — can you comment on #42440 also? I'm concerned about the direction of regression tests assuming format outputs. |
Version
v16.17.0
Platform
Darwin 21.6.0 Darwin Kernel Version 21.6.0: Wed Aug 10 14:25:27 PDT 2022; root:xnu-8020.141.5~2/RELEASE_X86_64 x86_64
Subsystem
No response
What steps will reproduce the bug?
Given this script:
Run with Node 16.16 will run just fine, with Node 16.17 it will throw:
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior?
March 16, 02:25 PM
What do you see instead?
March 16 at 02:25 PM
Additional information
I suspect that #42655 introduced the change. And I guess it's fine, since current browsers I've checked actually produce the same output as 16.17, so this issue is likely just documentation for people who stumble into this :)
The text was updated successfully, but these errors were encountered: