How it is worked out
ISO 8601: week 1 is the one containing the first Thursday of the year
Why it is done this way
The ISO 8601 standard defines weeks so that every week belongs entirely to one year. Week 1 is the week containing the first Thursday of January, which is the same as saying the week containing 4 January. Weeks run Monday to Sunday.
Step by step
- Find the Thursday of the week your date falls in
- Check which year that Thursday belongs to
- Count the weeks from the first Thursday of that year
- That count is the ISO week number
What is worth knowing
The Thursday rule exists to stop a week from being split between two years, which would make week numbers useless for planning. Its consequence is that the first days of January can belong to week 52 or 53 of the previous year, and the last days of December can belong to week 1 of the next — both correct under the standard and both surprising the first time you meet them. Note also that the US convention differs: weeks there often start on Sunday and week 1 is simply the one containing 1 January, so an American week number and an ISO one can disagree by one.