New issue
Advanced search Search tips

Issue 774836 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

Intl.DateTimeFormat returns wrong month name for "ar-EG-u-nu-arab-ca-islamic" locale

Reported by bader...@gmail.com, Oct 15 2017

Issue description

Steps to reproduce the problem:
let date = new Date("2017-07-18T14:54:01");
let dateFormatterOptions = { day: 'numeric', month: 'long', year: 'numeric' };
let dateLocales = (lang === 'ar') ? 'ar-EG-u-nu-arab-ca-islamic' : 'en-GB';
let shortDate = new Intl.DateTimeFormat(dateLocales,
    dateFormatterOptions).format(date);

shortDate format is wrong in all versions of Chrome for Android.

What is the expected behavior?
I should get:
٢٤ شوال، ١٤٣٨ هـ
based on your stable desktop version and Firefox for Ubuntu 17.04. (I'm not sure about the 'dateLocales' for Islamic months in Arabic but since it's working in the desktop browsers I think it's fine!)

What went wrong?
The month is wrong! I get the localized version from the Georgian calendar. We don't have
أكتوبر
in the Islamic months.

Did this work before? No 

Chrome version: 63.0.3239.0  Channel: canary
OS Version: 7.1.2; GT-I9300 Build/NJH47F
Flash Version: 

The source code is available on GitHub: https://github.com/badersur/badersur.github.io/blob/8d102d5ccb6098ae0c285742eb1426abef3b32b3/app/scripts/main.js#L64

and you can see the behaviour in my website: https://bader-sur.appspot.com/ar/ (or https://badersur.github.io/ar/) at the bottom of the page.
 
Components: -Blink Blink>JavaScript>Internationalization
Labels: Needs-triage-Mobile
Status: Available (was: Unconfirmed)
Labels: Triaged-Mobile
Tested on latest mobile Chrome Canary #64.0.3276.0 on Pixel XL build/OPM1.171019 and Chrome Desktop version #64.0.3277.0 and FireFox mobile and desktop browsers and couldn't different the correct and incorrect text. Requesting Internationalization team to look into this issue.

Thanks in advance.
774836.png
117 KB View Download

Comment 5 by bader...@gmail.com, Nov 24 2017

Hello @pnangunoori,

The correct text is:
نُشرت في ٢٤ شوال، ١٤٣٨
followed by the letter (هـ) in chrome desktop. It's nice to have this letter on chrome but maybe removing it would be better to have a consistent output across browsers!

and:
نُشرت في ٢٤ أكتوبر، ١٤٣٨
is the incorrect text on Chrome mobile.

We don't have these months in the Islamic calendar:
يناير (= January)
فبراير (= Feb..)
مارس
أبريل
مايو
يونيو
يوليو
أغسطس
سبتمبر
أكتوبر
نوفمبر
ديسمبر

In Oman, we use the localized Georgian calendar but without mixing it with islamic months and years as in:
١٨ يوليو ٢٠١٧
for 18 July 2017 used in my english home page!
Friendly ping.
Requesting Internationalization team to look into this issue.

Sign in to add a comment