dayjs set month error
- Dominant language
- JavaScript
- Stars
- 48.7k
- Forks
- 2.5k
- PR merge metrics
- No merged PRs in 30d
Description
dayjs v1.7.4
```
console.log('test dayjs()');
console.log(dayjs().set('month', 0).month(), 0);
console.log(dayjs().set('month', 1).month(), 1); // test not pass
console.log(dayjs().set('month', 2).month(), 2);
console.log(dayjs().set('month', 3).month(), 3); // test not pass
console.log(dayjs().set('month', 4).month(), 4);
console.log(dayjs().set('month', 5).month(), 5); // test not pass
console.log(dayjs().set('month', 6).month(), 6);
console.log(dayjs().set('month', 7).month(), 7);
console.log(dayjs().set('month', 8).month(), 8); // test not pass
console.log(dayjs().set('month', 9).month(), 9);
console.log(dayjs().set('month', 10).month(), 10); // test not pass
console.log(dayjs().set('month', 11).month(), 11);
```
##### Console output
test dayjs()
0 0
_**2 1**_ // test not pass
2 2
**_4 3_** // test not pass
4 4
_**6 5**_ // test not pass
6 6
7 7
_**9 8**_ // test not pass
9 9
_**11 10**_ // test not pass
11 11
Contributor guide
Assessment
This issue has not been assessed yet.