the weekStart option in locale file seens not work.
See original GitHub issueDescribe the bug A clear and concise description of what the bug is.
const dayjs = require('dayjs')
const weekday = require('dayjs/plugin/weekday')
const locale = {
weekStart: 1
}
dayjs.locale(locale, null ,true)
dayjs.extend(weekday)
const d1 = dayjs().startOf('week')
const date = d1.toDate()
console.log(date, d1.weekday())
result is ‘2019-08-17T16:00:00.000Z 0’ Expected behavior A clear and concise description of what you expected to happen. 2019-08-18T16:00:00.000Z 1
Information
- Day.js Version [e.g. v1.0.0] 1.8.15
- OS: [e.g. iOS] macOS
- Browser [e.g. chrome 62] node test.js
- Time zone: GMT+8 Asia/Shanghai
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
How to find first day of the week by locale?
I know I can access the user's locale with UserInfo.getLocale() , but I don't know how to find which day starts the week....
Read more >When does a week start? - Salesforce Developer Community
For Group and Personal Editions, the week is defined by the Locale setting in the company profile at Setup | Company Profile |...
Read more >How to set Monday as the first day of the week in GNOME 2 ...
I tried "sudo locale-gen", but it did not generate my necessary locale. So I had to force it with command "sudo locale-gen lv_LV.UTF-8"....
Read more >Is there any way to set week start from monday in ngx ...
NOTE: I am using Angular 12! The only way I know to make the week start from a different day is to use...
Read more >Change Schedule Week Start Day - When2Work.com
NOTE: If you have a paid subscription, the start day change will not be immediate, but will occur in that night's update. The...
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

This en-gb locale startWeek property is 1 but it is not working …Any solution