Skip to content

incorrect format of week #1818

Answered by SoniaLahi
wenqi73 asked this question in General
Jun 2, 2020 · 3 comments · 1 reply
Discussion options

You must be logged in to vote

This behavior is correct. Indeed, Monday 30th December 2019 is a Monday, the first Monday of the first week of 2020.

You can see more here : http://week-number.net/calendar-with-week-numbers-2019.html

I have tried with these values :

new Date(2019, 11, 28)  // Saturday  -> output 52
new Date(2019, 11, 29) // Sunday -> output 52 if first day of week is set to Monday, otherwise by default (Sunday) output is 01
new Date(2019, 11, 30) // Monday -> output 01
new Date(2019, 11, 31) // Tuesday -> output 01

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by kossnocorp
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@wenqi73
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #1818 on July 08, 2020 09:42.