iamkun / iamkun/dayjs

After updating `weekStart` to 1, formatting works fine, but `dayjs.weekdays()` still starts on Sunday

Open
#2,100 7 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
48.7k
Forks
2.5k
PR merge metrics
No merged PRs in 30d

Description

**Describe 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)

Contributor guide

Open the contributing guide

Research direction

Start at the dayjs.weekdays() entry point and trace how the weekStart setting is applied to weekday ordering. Confirm the behavior against the reported Monday-first expectation; done means the API returns Monday through Sunday when weekStart is 1.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.