Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How is weekOfYearNumber supposed to behave? #31

Open
vileanco opened this issue Jul 23, 2020 · 0 comments
Open

How is weekOfYearNumber supposed to behave? #31

vileanco opened this issue Jul 23, 2020 · 0 comments

Comments

@vileanco
Copy link

I am wondering how is the weekOfYearNumber intended to work? It seems that it does work properly when the year changes, eg. week number can jump from 53 to 1 while day of the week is changing from Tuesday to Wednesday.

For example:

Tuesday 2019-12-31 18:00 GMT (posix 1577815200000) gives output week=53
Wednesday 2020-01-01 18:00 GMT (posix 1577901600000) gives output week=1

If I have understood correctly, there are several standards on how to calculate the week number but for example ISO week date states that "Each week's year is the Gregorian year in which the Thursday falls". So in the previous example Tuesday should also be part of week 1 of year 2020 if following the ISO week date standard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant