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 doesn't respect the passed culture #24051

Closed
bworline opened this issue Nov 3, 2018 · 5 comments
Closed

Intl.DateTimeFormat doesn't respect the passed culture #24051

bworline opened this issue Nov 3, 2018 · 5 comments
Labels
confirmed-bug Issues with confirmed bugs. i18n-api Issues and PRs related to the i18n implementation.

Comments

@bworline
Copy link

bworline commented Nov 3, 2018

  • Version: 10.13
  • Platform: Windows Server v1607
  • Subsystem: unknown

date = new Date('6/15/2017 1:03 PM');
Intl.DateTimeFormat('fr-FR', {year:'numeric', month:'numeric', day:'numeric', hour:'numeric', minute:'numeric'}).format(date)

expected:
"2017-6-15 13:03"

actual: (I am in the US with en-US culture settings for language and locale)
"6/15/2017, 1:03 PM"

This worked fine in Node v8.10.0.

@vsemozhetbyt
Copy link
Contributor

I get '2017-6-15 13:03' with https://nodejs.org/download/release/v10.13.0/ as well as with https://nodejs.org/download/release/v8.10.0/

@vsemozhetbyt vsemozhetbyt added the i18n-api Issues and PRs related to the i18n implementation. label Nov 3, 2018
@bworline
Copy link
Author

bworline commented Nov 3, 2018

image

The above is from a repro on Windows 10 v1809 (OS Build 17763.55)

@bzoz
Copy link
Contributor

bzoz commented Nov 6, 2018

Can reproduce on English Windows 10 and Ubuntu, works as expected on Polish Windows 10

@Trott Trott added the confirmed-bug Issues with confirmed bugs. label Nov 6, 2018
@Whobeu
Copy link

Whobeu commented Mar 13, 2019

Looks like this is related to #15223 (comment). Landed on this issue looking for information myself about the formatting change. Works fine in 8.15 and 10.2.1 but not in higher versions of 10 or Node 11.

@jasnell
Copy link
Member

jasnell commented Jun 19, 2020

Appears to be working in master. Closing. Can reopen if necessary.

@jasnell jasnell closed this as completed Jun 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed-bug Issues with confirmed bugs. i18n-api Issues and PRs related to the i18n implementation.
Projects
None yet
Development

No branches or pull requests

6 participants