Weekstamp

Worked examples

Watch the year on the week label.

These are civil date-label conversions with no timezone or time of day. The week starts on Monday, and the weekday suffix runs from 1 through 7. Each example can be entered in either direction when the decoded day is supported.

1. New Year’s Day in the previous ISO year

Enter calendar date 2021-01-01. The day is Friday, ISO weekday 5. Its week runs Monday 2020-12-28 through Sunday 2021-01-03. The Thursday is in 2020, so the ISO label is 2020-W53-5.

In reverse mode, enter 2020-W53-5 to recover 2021-01-01. Do not use 2021-W53-5: ISO year 2021 has only 52 weeks, so that week number is invalid.

2. A December day in the next ISO year

Enter 2018-12-31. It is Monday. Its week’s Thursday is 2019-01-03, so the correct ISO week label is 2019-W01-1. The week’s Monday is still the entered date in 2018. A calendar year and an ISO week-year are different fields.

3. The end of a 53-week ISO year

Enter ISO date 2020-W53-7. Weekday 7 is Sunday, and the Gregorian result is 2021-01-03. The following Monday, 2021-01-04, is 2021-W01-1. The change of ISO week-year occurs at a week boundary, not necessarily at midnight between 31 December and 1 January.

4. A normal date within the same year

Calendar date 2026-10-20 is Tuesday and converts to 2026-W43-2. The week runs 2026-10-19 through 2026-10-25. In this case the calendar year and ISO week-year are both 2026.

5. Gregorian century leap rules still apply

2000-02-29 is valid because 2000 is divisible by 400. 1900-02-29 is invalid because 1900 is a century year not divisible by 400. The tool checks the date before computing a week label; it does not roll an impossible date into March.

6. The smallest supported year

0001-01-01 is Monday in the proleptic Gregorian model and converts to 0001-W01-1. Week Monday is 0001-01-01 and Sunday is 0001-01-07. The four-digit year spelling matters: 1-01-01 is not an accepted input form.

7. A valid day with an unavailable Sunday

9999-12-31 is Friday, 9999-W52-5. Its Monday is 9999-12-27. Its Sunday would fall beyond the supported year range, so Sunday is shown as unavailable and stored as null in JSON. The entered date and its ISO label remain valid.

Reverse input 9999-W52-7 instead asks to convert that out-of-range Sunday itself. This produces an explicit supported-range error. No endpoint is clipped to 9999-12-31.

8. Format checks avoid ambiguous labels

Use 2021-01-01 rather than 01/01/2021. Use uppercase W and two week digits in 2020-W53-5. A timestamp such as 2021-01-01T00:00:00Z is outside this date-only tool, and an extra timezone cannot change the chosen civil day.