<input type="date"> datepicker doesn't follow system "First day of week"
Categories
(Core :: DOM: Core & HTML, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox67 | --- | fixed |
People
(Reporter: jeroen.pulles, Assigned: mkmelin)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 2 obsolete files)
(deleted),
patch
|
mkmelin
:
review+
|
Details | Diff | Splinter Review |
Updated•7 years ago
|
Comment 1•7 years ago
|
||
Assignee | ||
Comment 2•6 years ago
|
||
Actually, this is still wrong even though I set intl.regional_prefs.use_os_locales true.
It's always using the Sunday as first day of week.
Assignee | ||
Comment 3•6 years ago
|
||
Updated•6 years ago
|
Comment 4•6 years ago
|
||
Assignee | ||
Comment 5•6 years ago
|
||
Comment 6•6 years ago
|
||
Assignee | ||
Comment 7•6 years ago
|
||
Switched to using Services.locale.regionalPrefsLocales
https://treeherder.mozilla.org/#/jobs?repo=try&revision=9a17d4d5e90e144ca0a32c62c26be28ba9810465&selectedJob=230179363
Comment 9•6 years ago
|
||
bugherder |
Comment 10•5 years ago
|
||
This may be "fixed" in terms of Mozilla believing their code is correct, but the issue itself is not fixed. People want to be able to change the first day of the week; Mozilla does not let them. I have Monday set as the first day of the week in my OS, I have intl.regional_prefs.use_os_locales
set to true
, OS locale set to Australia, app locale as UK because it's the closest, yet still the date picker puts Sunday first. This religious hangover has no relevance to many people; ISO 8601 deems Monday to be the first day of the week. I don't understand the insistence on perpetuating this outdated format.
Comment 11•5 years ago
|
||
@Roy - can you provide the output of your about:support section for Intl&L10n?
Comment 12•5 years ago
|
||
Internationalisation & Localisation
Application Settings | |
---|---|
Requested Locales | ["en-GB"] |
Available Locales | ["en-GB","en-US"] |
App Locales | ["en-GB","en-US"] |
Regional Preferences | ["en-AU"] |
Default Locale | "en-GB" |
Operating System | |
---|---|
System Locales | ["en-GB"] |
Regional Preferences | ["en-AU"] |
Comment 13•5 years ago
|
||
Seems like Gecko accurately picks your regional preferences locale as en-AU
.
The source of your problem is that CLDR picks Sunday as the first day of the week for region AU
[0] and Gecko platform nor products have API/UI to manually set regional preferences such as this.
I'm open to extend Gecko to support such overrides (hour cycle, first day, maybe several basic date/time styles), but it's a major project and I won't have time to work on that.
If you're interested, file a bug and I'll mentor you.
[0] https://github.com/unicode-cldr/cldr-core/blob/master/supplemental/weekData.json#L73
Comment 14•5 years ago
|
||
Yes and no. The real source of the issue is that CLDR is treated as canonical over retrieving the setting via GetLocaleInfoEx
on Windows, locale -k LC_TIME
on Linux, etc.
Comment 15•5 years ago
|
||
Ah, that's a good point!
We even have infra for that [0]! We currently take firstDay
straight from CLDR [1], but for some items like date/time patterns and hourcycle, we allow OSPreferences to provide an OS-specific overlay.
We could add OSPreferences::GetFirstDayOfTheWeek
which would return -1-6
where -1` means "no override" and then take it from CLDR, otherwise use the OS info.
[0] https://searchfox.org/mozilla-central/source/intl/locale/OSPreferences.h
[1] https://searchfox.org/mozilla-central/rev/40ef22080910c2e2c27d9e2120642376b1d8b8b2/js/src/builtin/intl/IntlObject.cpp#75
Description
•