Dev Helpers

Python / Time and schedules

Read an ISO week date

Dev Helpers · September 11, 2025

ISO week numbering has its own year boundary. A late-December calendar date can belong to week one of the next ISO year.

Worked example

from datetime import date
print(date.fromisocalendar(2026, 1, 1))

Result

2025-12-29

Implementation notes

ISO weeks start on Monday, and week one contains the year's first Thursday. This explains the surprising year near the boundary without relying on a list of exceptions.

Try it yourself

Convert an ISO week date near New Year's Day and inspect the calendar year.

Open the Python example →

Editorial date September 11, 2025 · Published December 6, 2026

Related articles

Run an async function

An async function call creates a coroutine. A top-level runner supplies the event loop that executes it.

Transpose a matrix

Transposing rows into columns assumes a decision about uneven rows. Ordinary zip stops at the shortest input.

Unpack with a remainder

Starred unpacking separates a fixed header from a variable-length tail. It still requires enough elements for the fixed positions.