WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
133637
new Date().getFullYear().toLocaleString('ar or kr') The results are displayed in a comma.
https://bugs.webkit.org/show_bug.cgi?id=133637
Summary
new Date().getFullYear().toLocaleString('ar or kr') The results are displayed...
ezBuilder
Reported
2014-06-09 00:17:24 PDT
new Date (). getFullYear (). toLocaleString ('ar') new Date (). getFullYear (). toLocaleString ('ko') new Date (). getFullUTCYear (). toLocaleString ('ar') new Date (). getFullUTCYear (). toLocaleString ('ko') Currently, the latest version of CHROME, IE, FF, SAFARI the results of running the above code is stamped out a comma. I wonder why the comma is visible too.
Attachments
The results by your browser.
(44.21 KB, image/png)
2014-06-09 00:19 PDT
,
ezBuilder
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
ezBuilder
Comment 1
2014-06-09 00:19:07 PDT
Created
attachment 232696
[details]
The results by your browser.
Andy VanWagoner
Comment 2
2018-07-27 10:33:07 PDT
Since this ticket was created ECMA 402 Internationalization API has been adopted by all these browsers. Depending on your locale, the grouping separator will be included in localized numbers. You can always request it not be included, though new Date().getFullYear().toLocaleString('ar', { useGrouping: false }) "٢٠١٨" Most locales won't use grouping separators when they know they are formatting a year. There may also be additional characters used to show it is a year. For this specific use case, you'd probably be better off doing: new Date().toLocaleString('ko', { year: 'numeric' }) "2018년" instead of new Date().getFullYear().toLocaleString('ko', { useGrouping: false }) "2018"
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug