Issue metadata
Sign in to add a comment
|
Int Datetime API not standard
Reported by
semnan...@gmail.com,
Sep 30
|
||||||||||||||||||||||
Issue description
UserAgent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:62.0) Gecko/20100101 Firefox/62.0
Steps to reproduce the problem:
1. open console
2. type `new Intl.DateTimeFormat('ar').format(test_date)`
3. see the result: `1/2/2018`
What is the expected behavior?
Same as firefox: ١/٢/٢٠١٨
Or see what'ts correct as ICU implementation
What went wrong?
ICU implementation seems be wrong at all.
Did this work before? No
Chrome version: 69 Channel: n/a
OS Version:
Flash Version:
https://github.com/mhf-ir/intl-browser-test
I create sample repo on github for more testing just test on Firefox and Chromium on linux and you can see the sample results:
https://github.com/mhf-ir/intl-browser-test/blob/master/diff.md
,
Oct 1
It's not os dependent. I thinks problem is for V8 or js engine somthing. same output on node.js
,
Oct 1
,
Oct 1
What is test_date here?
,
Oct 2
It's normal date object: var test_date = new Date(Date.UTC(2018, 1, 1, 0, 0, 0, 0)); on my tests is : https://github.com/mhf-ir/intl-browser-test/blob/master/views/index.pug#L14 README.md updated
,
Oct 7
any update
,
Oct 12
I tracked this down to the commit between 69.0.3487.1 and 69.0.3488.0 which upgraded the ICU dependency to the 62.1 version, reviewed here: https://chromium-review.googlesource.com/c/chromium/src/+/1111818 As you can see from the commit comment, it says: > Arabic number format expected results are also updated because Arabic > locales now use "European" digits by default in Chromium's ICU to match > the behavior of other Google products so it seems that this was a deliberate change to the default behaviour. You can override this default by using the unicode extension to the locale tag, as described here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat Specifically, you can override the numbering system used by using locale "ar-u-nu-arab" (the extra parts mean unicode extension, numbering system: arabic). There are also some specific Arabic sub-locales which default to using arabic numerals, such as "ar-EG", but it's probably safer to use the unicode extension override, to avoid the default changing in the future for the Egyptian locale.
,
Oct 22
,
Oct 25
Yes, this is WAI. Try 'ar-EG' locale to use Arabic digits.
,
Oct 25
BTW, CLDR 34 (shipped with ICU 63) standardized on European digits for the default Arabic locale (e.g. 'ar') with regional variants (e.g. ar-EG) to have Arabic digits. So, once Firefox updates its copy of ICU, it'll have the same behavior as Chrome/v8. |
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by phanindra.mandapaka@chromium.org
, Sep 30