You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: