Closed Bug 1579971 Opened 6 years ago Closed 6 years ago

Time zone format for Chinese is out of order

Categories

(developer.mozilla.org Graveyard :: Localization, defect)

All
Other
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

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?

Which URL on MDN are you referring to?

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.

Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: in-triage
Flags: needinfo?(cmills)

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.

Flags: needinfo?(cmills) → needinfo?(r8rsfans00075)

dateStyle and timeStyle options aren't implemented → bug 1557718.

MDN Web Docs' bug reporting has now moved to GitHub. From now on, please file content bugs at https://github.com/mdn/sprints/issues/ and platform bugs at https://github.com/mdn/kuma/issues/.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.