formatShortWeekday always returns a date string in English
See original GitHub issueEven if my locale is set to ‘fr-FR’, formatShortWeekday
pass as 1st argument the date in english and as a String, I can’t manage to format it as I would.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
DateFormatter returning string with incorrect language
You want to change the date format with the current device language. Set Locale as your preferred language let formatter = DateFormatter() ...
Read more >Date.prototype.toLocaleDateString() - JavaScript | MDN
The toLocaleDateString() method returns a string with a language-sensitive representation of the date portion of the specified date in the ...
Read more >Strange problem - date is always displayed in English
I turned on language debugging. I find the corresponding date string in moodledata/lang/bg/langconfig.php and added additional characters to ...
Read more >Dates - Julia Documentation - The Julia Programming Language
(Note that the default year is 1 AD/CE.) Consequently, an empty string will always return 0001-01-01 for Date s, and 0001-01-01T00:00:00.000 for DateTime...
Read more >Date and time localization - Lokalise Blog
As you can see, it returns the date as a string including the time zone. In JavaScript, the ISO date format can be...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I actually tried that first, but then changed it to what you recommended above. Unfortunately I am still so inexperienced, I did not understand that was not a solution, but something else…
But I think I now got it working by adding the following inline: formatShortWeekday={(locale,value) => [‘Su’, ‘Ma’, ‘Ti’, ‘Ke’, ‘To’, ‘Pe’, ‘La’][value.getDay()]}
I tried to create a callback and it was probably the issue I had.
Thanks, @tokurvin At this time, I’m using this library, but I don’t know formatShortWeekday, your comment helps me a lot.