I want to calculate the ISO year number based on a date.
First ISO week:
The ISO 8601 definition for week 01 is the week with the Gregorian year's first Thursday 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.
ISO YEAR ISO WEEK Starts on
2019 1 ma 31-12-2018
2020 1 ma 30-12-2019
2021 1 ma 04-01-2021
2022 1 ma 03-01-2022
2023 1 ma 02-01-2023
2024 1 ma 01-01-2024
2025 1 ma 30-12-2024
2026 1 ma 29-12-2025
If 1 January is on a Monday, Tuesday, Wednesday or Thursday, it is in week 01. If 1 January is on a Friday, it is part of week 53 of the previous year. If it is on a Saturday, it is part of the last week of the previous year which is numbered 52 in a common year and 53 in a leap year. If it is on a Sunday, it is part of week 52 of the previous year.
... View more