iamkun / iamkun/dayjs

How to set Monday as the first day of the week

Open
#1,646 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

怎样设置星期一为一周的第一天,如果今天是2021/9/28,想用dayjs().startOf('week') 获取的是27号星期一,而不是26号星期日。

Contributor guide

Open the contributing guide

Research direction

Start by locating the implementation of dayjs().startOf('week') and review the existing week-related behavior or tests. Confirm how the first day of the week is selected, then define the expected result for the stated 2021/9/28 example and add coverage for Monday-based weeks.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Feature
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.