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
"...
First week
The ISO 8601 definition for week 01 is the week with the first Thursday of the Gregorian year (i.e. of January) in it. The following definitions based on properties of this week are mutually equivalent, since the ISO week starts with Monday:
It is the first week with a majority (4 or more) of its days in January.
Its first day is the Monday nearest to 1 January.
It has 4 January in it. Hence the earliest possible first week extends from Monday 29 December (previous Gregorian year) to Sunday 4 January, the latest possible first week extends from Monday 4 January to Sunday 10 January.
It has the year's first working day in it, if Saturdays, Sundays and 1 January are not working days.
..."
Environment
Vuetify Version: 3.6.7
Vue Version: 3.4.23
Browsers: Chrome 128.0.0.0
OS: Mac OS 10.15.7
Steps to reproduce
use a v-date-picker, display calendar week and navigate to December 2024
Expected Behavior
The week starting the 30th of December should be week 1 not week 53
Actual Behavior
Week 53 is dispayed instead of week 1
Reproduction Link
https://play.vuetifyjs.com/#...
Other comments
I guess it's a bug in the getWeek function in https://github.com/vuetifyjs/vuetify/blob/master/packages/vuetify/src/composables/date/date.ts
I tried this function also and it returns 53.
According to the ISO standard it should be week 1: https://en.wikipedia.org/wiki/ISO_week_date
"...
First week
The ISO 8601 definition for week 01 is the week with the first Thursday of the Gregorian year (i.e. of January) in it. The following definitions based on properties of this week are mutually equivalent, since the ISO week starts with Monday:
It is the first week with a majority (4 or more) of its days in January.
Its first day is the Monday nearest to 1 January.
It has 4 January in it. Hence the earliest possible first week extends from Monday 29 December (previous Gregorian year) to Sunday 4 January, the latest possible first week extends from Monday 4 January to Sunday 10 January.
It has the year's first working day in it, if Saturdays, Sundays and 1 January are not working days.
..."
Also performed a Wolfram Alpha search: https://www.wolframalpha.com/input?input=what+is+the+date+of+the+first+week+of+2025
There is a working implementation here: https://gist.github.com/vincentorback/8edffeca20e7a9e5e2a6?permalink_comment_id=1769808 and some more info here https://stackoverflow.com/questions/58708417/why-is-1-added but I don't know whether you can use this code (licence?).
The text was updated successfully, but these errors were encountered: