iamkun / iamkun/dayjs

timezone disable weekStart, when locally change

Open
#1,730 4 comments 0 reactions 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**
![image](https://user-images.githubusercontent.com/5386958/144387828-69762514-4c01-4126-a9ec-b71c8c434ff2.png)

weekStart is 5, first day of week is Monday.

- global locale weekStart is fine
- day is fine

dayjs.tz & locally locale not work

**Expected behavior**
First day of week should be Friday

**Information**
- Day.js 1.10.7
- OS: macos
- Browser chrome 90+
- Time zone: Asia/Shanghai

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue with Day.js 1.10.7 using dayjs.tz and a locally changed locale with weekStart set to 5, then compare it with the working global-locale behavior. Done means the local timezone and locale combination recognizes Friday as the first day of the week.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.