Time zone format for Chinese is out of order
Categories
(developer.mozilla.org Graveyard :: Localization, defect)
Tracking
(Not tracked)
People
(Reporter: r8rsfans00075, Unassigned, NeedInfo)
Details
(Keywords: in-triage, Whiteboard: [specification][type:bug])
What did you do?
Using Intl.DateTimeFormat, wrote this line:
console.log(new Intl.DateTimeFormat('zh-SG', {dateStyle: 'full', timeZoneName: 'short', timeStyle: 'long'}).format(new Date()));
What happened?
got this output:
"2019年9月9日星期一 GMT-5 下午2:13:40"
What should have happened?
according to Chinese formatting, the time zone info should be at the end:
"2019年9月9日星期 下午2:13:40 一 GMT-5"
Is there anything else we should know?
Comment 1•6 years ago
|
||
Which URL on MDN are you referring to?
| Reporter | ||
Comment 2•6 years ago
|
||
Comment 3•6 years ago
|
||
Ok. So it's not really a "bug" in the code but a flaw in the content. Does that make sense?
MDN is an open wiki that is made possible by everyone helping each other. If you have found a flaw in the documentation you can make that edit yourself. All you need is a GitHub account and then click to edit the page.
By the way, I see no mention of zh-SG anywhere on that page.
Updated•6 years ago
|
Comment 4•6 years ago
|
||
I'm not sure if this is a problem with the documentation. Possibly it is more likely to be a problem with the implementation in browsers?
When I run console.log(new Intl.DateTimeFormat('zh-SG', {dateStyle: 'full', timeZoneName: 'short', timeStyle: 'long'}).format(new Date())); in Firefox, I get
2019年9月17日 GMT+1
When I run it in Chrome, I get
2019年9月17日星期二 GMT+1 上午9:04:55
Are both of these wrong? If so, we should file bugs against the browsers themselves. Well, I could change this bug over to the relevant JavaScript component, but you'd need to go and file a new bug against Chromium.
Comment 5•6 years ago
|
||
dateStyle and timeStyle options aren't implemented → bug 1557718.
Comment 6•6 years ago
|
||
Updated•6 years ago
|
Description
•