Open Bug 1377218 Opened 7 years ago Updated 2 years ago

mozIntl.getDisplayNames returns wrong keys for non-gregorian calendar locales

Categories

(Core :: Internationalization, enhancement, P3)

enhancement

Tracking

()

People

(Reporter: zbraniecki, Unassigned)

References

Details

As pointed out in bug 1370086, we currently don't correctly enforce gregory calendar when asking for gregory calendar keys.

For example:

```
Services.intl.getDisplayNames('fa', {keys:['dates/gregorian/months/june']}).values;
```

returns:
```
// Object { dates/gregorian/months/june: "شهریور" }
```

which is actually a Hijri month.

When I do:
```
Services.intl.getDisplayNames('fa-u-ca-gregory', {keys:['dates/gregorian/months/june']}).values;
```

I get:
```
// Object { dates/gregorian/months/june: "ژوئن" }
```

Which is the correct Gregorian month.

That means that we call to ICU for June, but we get 6th month of the calendar associated with the locale.

We should fix it by either changing our ICU calls, or changing the API keys to not indicated gregory calendar.
Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.