toLocaleDateString() returns weird month names for some locales (M01, M02, etc)
Reported by
sabintim...@gmail.com,
Nov 14
|
||||
Issue description
UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
Steps to reproduce the problem:
1. Execute the following commands in the console:
var formatOptions = { year: 'numeric', month: 'long', day: 'numeric' };
console.log(new Date("2018-01-01T00:00:00").toLocaleDateString("ne-NP", formatOptions))
console.log(new Date("2018-01-01T00:00:00").toLocaleDateString("sq-AL", formatOptions))
What is the expected behavior?
The date should be formatted with a legible month name.
Sensible defaults should be used if locale is not supported yet.
What went wrong?
The month is formatted with "M01", "M02", etc. as the month (e.g., "2018 M01 1")
This is very unreadable. "January" would be a better default value compared to "M01".
Did this work before? N/A
Chrome version: 70.0.3538.77 Channel: n/a
OS Version: 10.0
Flash Version:
,
Nov 15
Able to reproduce the issue on chrome reported version# 70.0.3538.77, # 70.0.3538.102 and on latest chrome# 72.0.3610.0 as per comment# 0 using Mac 10.12.6, Windows-10 and Ubuntu 14.04. As this issue is seen from M-60(60.0.3112.0), hence considering this issue as Non-Regression and marking it as Untriaged. Thanks!
,
Nov 16
Over to Javascript Internationalization
,
Nov 22
|
||||
►
Sign in to add a comment |
||||
Comment 1 by swarnasree.mukkala@chromium.org
, Nov 15