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

Intl.DateTimeFormat.format() output has changed since 18.19.1 and no-longer matches Chrome/Firefox (for en-NZ) #52258

Closed
flakey-bit opened this issue Mar 28, 2024 · 2 comments
Labels
icu Issues and PRs related to the ICU dependency.

Comments

@flakey-bit
Copy link

Version

v18.20.0

Platform

Linux XLW-5CD9332MDP 5.15.146.1-microsoft-standard-WSL2 #1 SMP Thu Jan 11 04:09:03 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

Subsystem

No response

What steps will reproduce the bug?

const date = new Date(Date.UTC(2020, 11, 20, 3, 23, 16, 738));

console.log(
  new Intl.DateTimeFormat('en-NZ', {
    dateStyle: 'medium',
    timeStyle: undefined,
  }).format(date),
);

Output for Node 18.19.1: 19/12/2020
Output for Node 18.20.0: 19 Dec 2020

NB: Output for Node 20+ is as-per 18.20.0

Chrome/Firefox behave as-per Node 18.19.1 which makes me question whether this is a regression (I'm aware 18.20 included ICU updates).

image

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

Reproduces consistently.

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

Expected behaviour is as-per Node 18.19.1 because that behaviour also matches Firefox and Chrome

i.e. expected output 19/12/2020

What do you see instead?

Observed output is 19 Dec 2020

Additional information

No response

@flakey-bit
Copy link
Author

This is quite likely to be related to #52244

@VoltrexKeyva VoltrexKeyva added the icu Issues and PRs related to the ICU dependency. label Mar 30, 2024
@targos
Copy link
Member

targos commented Apr 8, 2024

Yes, it's the same as #52244. Chrome Canary also shows the new format.

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

3 participants