Open Bug 1902653 Opened 4 months ago Updated 4 months ago

Date format incorrect for en-ES

Categories

(Core :: Internationalization, defect)

Firefox 127
defect

Tracking

()

UNCONFIRMED

People

(Reporter: dom, Unassigned)

References

Details

Attachments

(2 files)

Steps to reproduce:

The Spanish date format is dd/mm, not mm/dd, but Firefox seems to use the
incorrect US version.

I use macOS 14.5.

Reproducer:

  1. Open "System Settings -> Language & Region" and set "Region" to "United Kingdom"
  2. Close and reopen Firefox
  3. Navigate to https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/date
  4. Date format is dd/mm/yyyy (correct)
  5. Open "System Settings -> Language & Region" and set "Region" to "Spain"
  6. Close and reopen Firefox
  7. Reopen https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/date
  8. Date format is mm/dd/yyyy (incorrect)

When "Region" is set to "United Kingdom" about:support shows the following for
the "Internationalisation & Localisation" section:

Application Settings
Requested Locales 	["en-GB","es-ES"]
Available Locales 	["en-GB","en-US","es-ES"]
App Locales 	["en-GB","en-US","es-ES"]
Regional Preferences 	["en-GB"]
Default Locale 	"en-GB"
Operating System
System Locales 	["en-GB"]
Regional Preferences 	["en-GB"]

This produces the expected date format (dd/mm/yyyy).

When the "Region" is set to "Spain":

Application Settings
Requested Locales 	["en-GB","es-ES"]
Available Locales 	["en-US","en-GB","es-ES"]
App Locales 	["en-GB","en-US","es-ES"]
Regional Preferences 	["en-ES"]
Default Locale 	"en-GB"
Operating System
System Locales 	["en-ES"]
Regional Preferences 	["en-ES"]

This produces the incorrect date format (mm/dd/yyyy).

I've also tried the following, which did not resolve the problem:

* Removing "English (US)" from "Preferred language for displaying pages"
* Using "Troubleshooting Mode"
* Reinstalling Firefox
* Using a different computer (with same macOS regional config)

Actual results:

Dates were formatted as mm/dd/yyyy which is incorrect for the Spanish region (dd/mm/yyyy).

Expected results:

Dates should have been formatted dd/mm/yyyy.

I have tried enabling and disabling the option "Use your operating system settings for "English (Spain)" to format dates, times, numbers and measurements" to no effect.

macOS (and other applications) render the date in the expected dd/mm/yyyy format when using the "Spanish" region setting.

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
Severity: -- → S3
See Also: → 1739712

I guess that you install Firefox's es-ES locale then set intl.regional_prefs.use_os_locales=true by about:config. See bug 1739712 comment #5 for our implementation.

Attached image langs.png
Attached image image.png

Thanks for the suggestion Makoto!

I already have en-ES installed:

And use_os_locales is also true:

See attached images - they didn't render in the comment :(

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: