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

date.toLocaleString error: locale not respected #35140

Closed
Muller59 opened this issue Sep 10, 2020 · 1 comment
Closed

date.toLocaleString error: locale not respected #35140

Muller59 opened this issue Sep 10, 2020 · 1 comment
Labels
i18n-api Issues and PRs related to the i18n implementation. invalid Issues and PRs that are invalid.

Comments

@Muller59
Copy link

Muller59 commented Sep 10, 2020

What steps will reproduce the bug?

program

var http = require('http');
var date = new Date();
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/html'});
date = new Date();
res.end('Hello World! Date is: ' + date.toLocaleString("de"));
}).listen(7070);


output
Hello World! Date is: 9/10/2020, 12:50:53

expected output
Hello World! Date is: 10.9.2020, 12:50:53 (dd.mm.yyyy with correct separator)

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

always

What is the expected behavior?

see above

What do you see instead?

Additional information

@bnoordhuis
Copy link
Member

v12.x only supports the en-US locale. For other locales, either upgrade to v14.x or install the full-icu package.

Closing, not a bug and a duplicate of several other reports.

@bnoordhuis bnoordhuis added i18n-api Issues and PRs related to the i18n implementation. invalid Issues and PRs that are invalid. v12.x labels Sep 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
i18n-api Issues and PRs related to the i18n implementation. invalid Issues and PRs that are invalid.
Projects
None yet
Development

No branches or pull requests

3 participants
@bnoordhuis @Muller59 and others