Skip to content
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

en-GB locale format changes in 20.12.1 #52419

Closed
Mezzle opened this issue Apr 8, 2024 · 4 comments
Closed

en-GB locale format changes in 20.12.1 #52419

Mezzle opened this issue Apr 8, 2024 · 4 comments
Labels
icu Issues and PRs related to the ICU dependency.

Comments

@Mezzle
Copy link

Mezzle commented Apr 8, 2024

Version

v20.12.1

Platform

Darwin cube.local 23.4.0 Darwin Kernel Version 23.4.0: Fri Mar 15 00:12:49 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6020 arm64 arm Darwin

Subsystem

No response

What steps will reproduce the bug?

Test case:

https://github.com/Mezzle/node-date-format-bug

Same code run in both 20.11.1 and 20.12.1 returns different results.

 ❯ cd 20.11
Using Node v20.11.1
 ❯ node test.js
Mon, 8 April 2024 at 11:47
 ❯ cd ../20.12
Using Node v20.12.1
 ❯ node test.js
Mon 8 April 2024 at 11:47

How often does it reproduce? Is there a required condition?

No response

What is the expected behavior? Why is that the expected behavior?

it is expected that the date is consistent across versions.

What do you see instead?

I see that 20.12.1 has a missing , difference.

Additional information

No response

@climba03003
Copy link
Contributor

According to #51090 (comment)
The output is not guarantee to be the same over the same major.
You should never rely on the output of formatted date.

node@20.12.0 updates ICU to 74.2. Includes CLDR 44.1 and Unicode 15.1.

@VoltrexKeyva VoltrexKeyva added the icu Issues and PRs related to the ICU dependency. label Apr 8, 2024
@RedYetiDev
Copy link
Member

As @climba03003 mentioned, I don't believe this is an issue, but a feature that comes with updating Node.JS, if you disagree, please elaborate on your concern.

Thank you!

@RedYetiDev RedYetiDev closed this as not planned Won't fix, can't repro, duplicate, stale Apr 21, 2024
@Mezzle
Copy link
Author

Mezzle commented Apr 21, 2024

My concern regarding this is that - in a minor version change, there is a backwards compatibility break. If you transition from 20.11->20.12, and rely on this functionality, it's broken, which goes against the semver I believe Node uses

I don't believe these changes are documented anywhere (at least they weren't noticable), and I didn't expect a BC break with a minor version.

@RedYetiDev
Copy link
Member

It may seem like a backwards compatibility break, but it's just keeping the Unicode standard. All of this locale formatting is standardized by Unicode, so we are just following the changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
icu Issues and PRs related to the ICU dependency.
Projects
None yet
Development

No branches or pull requests

4 participants