dayjs format 'YYYY-ww' error
Open
- Dominant language
- JavaScript
- Stars
- 48.7k
- Forks
- 2.5k
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
```html
dayjs.extend(window.dayjs_plugin_advancedFormat)
dayjs.extend(window.dayjs_plugin_customParseFormat)
dayjs.extend(window.dayjs_plugin_weekOfYear)
dayjs.extend(window.dayjs_plugin_weekYear)
var date = dayjs("2022-31", "YYYY-ww").toDate()
console.log(date); // Sat Jan 01 2022 00:00:00 GMT+0800 (中国标准时间)
console.log(dayjs(date).format('YYYY-ww')); // 2022-01
```
**Expected behavior**
```js
console.log(dayjs(date).format('YYYY-ww')); // 2022-31
```
**Information**
- Day.js Version [e.g. v1.11.4]
- Browser [e.g. chrome 103.0.5060.134]
- Time zone: [e.g. GMT-07:00 DST (Pacific Daylight Time)]
Contributor guide
Assessment
This issue has not been assessed yet.