iamkun / iamkun/dayjs

Parse year + week of year

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

Description

I'm trying to parse the week of year in the following format: 2022W44. I have included the customParseFormat, advancedFormat, isoWeek and weekOfYear plugins. See the following examples:

```js
dayjs('2022W44', 'YYYY[W]WW'); // Expected: 2022-11-31, got: 2022-01-01
dayjs('2022W07', 'YYYY[W]WW'); // Expected: 2022-02-14, got: 2022-01-01
```
Did I forgot to include a plugin? Is the parse format invalid? Or did I just found a bug?

dayjs version 1.11.6

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.