eclipsesource / eclipsesource/J2V8

Date.toLocaleString doesn't support locales and options params

Open
#467 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
2.6k
Forks
387
PR merge metrics
No merged PRs in 30d

Description

**Nodejs** doesn't support **locales** and **options** params in the next functions of **Date**'s object: **toLocaleString**, **toLocaleDateString**, **toLocaleTimeString**?
I have the snippet to check support:
```
(function() {
try {
new Date().toLocaleTimeString('i');
} catch (e) {
return e.name === 'RangeError';
}
return false;
})();
```
This code returns true in browsers and false in j2v8.

Seems as **Nodejs** supports functions without these params.
And is it possible to run v8 in your project with custom locale, not the en-US?

I found the next:
https://github.com/nodejs/node/issues/8500#issuecomment-246432058

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.