Closed Bug 1805995 Opened 2 years ago Closed 2 years ago

Intl.DateTimeFormat with en-CA locale gives unexpected values since FF 109 beta

Categories

(Core :: Internationalization, defect)

Firefox 109
defect

Tracking

()

RESOLVED DUPLICATE of bug 1818103

People

(Reporter: bart, Unassigned)

Details

Steps to reproduce:

I'm testing a website I'm developing in FF 109b2. What was working as expected in FF 108 is not in 109b2.

This particular line of JS:

new Intl.DateTimeFormat("en-CA", {dateStyle: "short"}).format(new Date(1234567890))

Actual results:

"1/14/70" is produced in 109b2. This a US date format.

Expected results:

"1970-01-14" is produced in 108 and earlier.

The Bugbug bot thinks this bug should belong to the 'Core::Internationalization' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Internationalization
Product: Firefox → Core

That's intended. I18n results are best-effort and may change over time as data on locales gets improved. In this case, en-CA date formats have been improved and all computer systems will migrate to new ones - https://github.com/unicode-org/cldr-json/blob/main/cldr-json/cldr-dates-modern/main/en-CA/ca-gregorian.json#L323-L327

If you were trying to get non-localized (ISO) dates using en-CA locale, please, do not rely on i18n for stable outputs.

Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Resolution: --- → INVALID

In this case, en-CA date formats have been improved

But in Canada we don't use "month day year", which is what is now being returned. That's a regression, not an improvement.

See https://en.m.wikipedia.org/wiki/Date_and_time_notation_in_Canada

Duplicate of bug: 1818103
Resolution: INVALID → DUPLICATE
You need to log in before you can comment on or make changes to this bug.