-
Notifications
You must be signed in to change notification settings - Fork 99
Respecting users language when formatting dates #8930
Copy link
Copy link
Open
Labels
designDesign, UX, interface and interaction designDesign, UX, interface and interaction designdiscussionNeed advices, opinions or ideas on this topicNeed advices, opinions or ideas on this topicenhancementNew feature or requestNew feature or requestfeature: datepickerRelated to the date/time picker componentRelated to the date/time picker componentl10nLocalizationLocalization
Description
Activity
Metadata
Metadata
Assignees
Labels
designDesign, UX, interface and interaction designDesign, UX, interface and interaction designdiscussionNeed advices, opinions or ideas on this topicNeed advices, opinions or ideas on this topicenhancementNew feature or requestNew feature or requestfeature: datepickerRelated to the date/time picker componentRelated to the date/time picker componentl10nLocalizationLocalization
When formatting dates the users locale setting is used but not the language.
Proposed change
Keep using users locale to determine date formats.
But use the users language for translating the words (month and weekday names) in the formatted date.
Example
Intl.DateTimeFormat(.., { dateStyle: 'full'})Monday, March 2, 2026Montag, März 2, 2026Note the result is not
'Montag, 2. März 2026'which would be the German format for{ dateStyle: 'full'}.Montag, März 2, 2026is still the English format but with German words.Affect components
NcDateTimePickerNcDateTimeuseFormatTimeIntl.DateTimeBackground
Review comment #8644 (comment)