CALENDAR ARITHMETIC

Checking whether a week-year actually contains ISO week 53

Week numbers run up to 53, but only some ISO week-years contain a week 53. The converter checks the week-year and week together, so a number that fits the range can still be rejected.

A range check is not enough

The week field accepts values from 1 to 53, so week 53 passes a simple range test. The ISO week calendar, though, has years of 52 weeks and years of 53 weeks, and week 53 exists only in the second kind. The reverse converter therefore asks a second question after the range test: does the requested week occur in that week-year? Week 53 of 2020 does, and the tool returns a date. Week 53 of 2021 does not, and the tool rejects the request with a message that the week does not exist. The first check protects the input format, and the second protects the calendar.

Week 53 of 2020

Week 1 of 2020 is the week containing January 4, a Saturday, so it begins on Monday 2019-12-30. Weeks then run in blocks of seven days. Week 53 starts 52 weeks later, on Monday 2020-12-28, and ends on Sunday 2021-01-03. The converter returns 2020-12-28 for week-year 2020, week 53 and weekday 1. The week mixes four December days with three January days, which is why its first days carry a week-year that differs from the visible calendar year for the last three. The tool's answer agrees with that hand count, which is a handy way to confirm the anchor rule by eye.

Week 53 of 2021 does not exist

Week 1 of 2021 is the week containing January 4, a Monday, so it begins on 2021-01-04. The 52nd week begins on 2021-12-27 and ends on Sunday 2022-01-02. The next Monday, 2022-01-03, starts week 1 of 2022, because it belongs to the week with January 6 as its Thursday. Nothing remains for a 53rd week of 2021. A request for week 53, weekday 1 of 2021 would have to land on 2022-01-03, which the formula assigns to another week-year. The round-trip check inside the tool detects that mismatch and rejects the input instead of returning a date from the wrong year.

Which years have 53 weeks

An ISO year has 53 weeks when January 1 falls on a Thursday, or when it is a leap year and January 1 falls on a Wednesday. Equivalently, the year has 53 Thursdays. The year 2015 began on a Thursday and has 53 weeks. The year 2020 is a leap year that began on a Wednesday, and it has 53 weeks. The year 2026 begins on a Thursday and has 53 weeks too, with week 53 starting Monday 2026-12-28. The years 2021 through 2025 have 52 weeks each. Over a long run, about 71 of every 400 years contain a week 53, which makes the 53-week year less common but far from rare.

Why 52 weeks is not a safe assumption

A year has 365 or 366 days, which is 52 weeks and one or two extra days. The extra days accumulate, and when they push a Thursday into a new position the calendar adds a week. Code that assumes 52 weeks per year will fail in the years with 53, and sums that treat weeks as fiscal periods drift. Payroll and production schedules that use ISO weeks have to handle week 53 explicitly, for example by allowing one longer period every five or six years. The tool's rejection of week 53 in 2021 is the same check that such code needs.

Do not repair a rejected week by guessing

If a source record says 2021-W53-1, the tool refuses it. Moving to week 52 changes the date by a week, and moving to week 1 of 2022 changes both the year and the date. Either guess produces a valid date that the source never named. The better steps are to look at the original record, check whether the year or the week was mistyped, and compare with any separate calendar date in the same row. If the record carries a date such as 2022-01-03, the correct week date is 2022-W01-1. Fix the source field and keep a note of the correction. For a week-year that does have a week 53, the same discipline applies: a record for 2020-W53-3, which is Wednesday 2020-12-30, is valid, and the tool will convert it without complaint.

Checking an imported table

When a file lists week-year and week pairs, validate each pair against the calendar before converting. A pair like (2020, 53) passes, (2021, 53) fails, and (2026, 53) passes. A practical test is to convert the Monday of week 53 for each year in the file and see which years return an error. With weekday 1, the Monday of week 53 for 2026 is 2026-12-28, which the tool accepts, and for 2025 the tool would reject the request. Rejected pairs usually mean a typed year or a week number computed with a different convention, such as a US-style week. Some businesses also keep their own fiscal calendar of 52 or 53 weeks, and its week 53 can fall in different years from the ISO one, which is another reason to convert only what the file says is ISO. The ISO week 53 years in this decade are 2015, 2020 and 2026.

Week 1 of a year that begins on a Thursday

The same Thursday rule that creates a 53-week year also shifts where week 1 starts. January 1, 2026 is a Thursday, so week 1 of 2026 is the week containing it, and that week begins on Monday 2025-12-29. The converter returns 2025-12-29 for week-year 2026, week 1 and weekday 1. Three December days of 2025 therefore carry the week-year 2026, mirroring the way January days sometimes carry the previous week-year. A table that lists week 1 of 2026 as starting on a date in January would be off by three days, and the same table would put week 53 of 2026 at the end of December, where it starts on the 28th.

What the check covers

The test confirms that the converter enforces the ISO 8601 week structure for the tested pair. It does not decide whether a source system uses the ISO rule, since some systems count weeks from Sunday or from the week containing January 1. It does not say which date a business meant by a week label, and it adds no information about time zones. If a downstream process needs a date, keep the week-year, week and weekday together with the converted date so the pair can be audited later.

Reproduce the checks

Existing week 53

Open the Iso Week To Date Calculator and enter:

Week year
2020
Week
53
Weekday
1

Expected output:

Date

2020-12-28

The requested combination belongs to week-year 2020.

Absent week 53

Open the Iso Week To Date Calculator and enter:

Week year
2021
Week
53
Weekday
1

Expected rejection:

does not exist

The numeric range alone cannot validate this combination.

References and implementation scope

The examples describe the behavior of the linked Computandum tools. A successful local check does not establish that another application accepts the same format or applies the same limits.

Sources

Related tasks