After updating `weekStart` to 1, formatting works fine, but `dayjs.weekdays()` still starts on Sunday
See original GitHub issueDescribe the bug
After updating weekStart to 1, formatting works fine, but dayjs.weekdays() still starts on Sunday. I
I get: [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ]
Expected behavior
I want to get: ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]
Information
- Day.js Version:
^1.11.5 - OS: Windows 11
- Browser: Google Chrome
107.0.5304.62 - Time zone: GMT+02:00 (Warsaw/Poland)
Issue Analytics
- State:
- Created a year ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
weekdays are incorrect for all instances of en locale ... - GitHub
After updating weekStart to 1, formatting works fine, but dayjs.weekdays() still starts on Sunday #2100. Open.
Read more >Customize
Day.js is very easy to customize. ... Update an existing locale. ... If the value is 1, Monday will be the start of...
Read more >[Updated] How to Set 'Week of Year' to Start on Sunday in ...
In this post, I will take you through my solution for creating a 'Week of Year' field that begins on Sunday in Google...
Read more >Week Start - Sunday instead of Monday - Qlik Community
Solved: Is there any option in QlikView to set the week start globally to desired Day instead of default Monday. I have tried...
Read more >Get current week start and end date in Java - Stack Overflow
Updated answer using Java 8. Using Java 8 and keeping the same principle as before (the first day of the week depends on...
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 Free
Top 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

Dayjs tries to be as compatible to
momentas possible. If you look at the api ofmoment, you will fond that there is a separate signature for getting the day names in local order (look for moment.weekdays(true)).So it may be advisable to ask for a new feature that will add this functionality to dayjs (without killing the current functionality).
I suppose, @ortonomy (from issue #1886) will like this too.
And I am sure that @iamkun will appreciate a pr for this 😄
I would simply change the title to something that makes clear, what this feature should do (e.g. “feature - add option to weekdays() to get weekday names sorted by locale”).
And then we need who creates this feature (via a pull request). Wouldn’t this be something you would do for this project? If you need more information, feel free to ask.