iamkun / iamkun/dayjs

weekOfYear week method doesn't seems to handle week number 53 for 'uk' locale (Ukraine)

Open
#3,057 2 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**
I have an issue with the dayjs week() method compared with the moment.js one.
My issue is probably linked to this one https://github.com/iamkun/dayjs/issues/3048

**Expected behavior**
I tried with that date: 2020-12-31, which is supposed to be a day in the week number 53. (if i refer to this http://www.whatweekisit.org/). But it returns week number as 1

**Information**
- Day.js Version [e.g. v1.11.20]
- OS: [Mac OS]
- Browser [Chrome 147]
- Time zone: [Eastern European Summer Time]

Contributor guide

Open the contributing guide

Research direction

Start at the week() method and the locale-specific week handling, reproducing the report with the uk locale and date 2020-12-31. Compare the result with the expected week 53 and the related issue #3048; done means week() handles this boundary consistently with the stated expectation.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.