--- id: iso-week-date version: "2.3.0" license: MIT license_treatment: permissive maintenance: active --- # iso-week-date — Toolkit to work with str representing ISO Week date format License: permissive · Maintenance: active · Downloads: 291.0K/mo ## What it is and what it does iso-week-date provides classes and utilities to work with ISO Week date formats without the friction of repeatedly converting between strings, date objects, and datetime objects. The core classes—IsoWeek and IsoWeekDate—handle parsing from multiple input types, support arithmetic operations (addition/subtraction with integers), comparison, and range generation. IsoWeek lets you list all dates in a week or fetch the nth day; IsoWeekDate gives you the weekday as an integer and the containing ISO week as a string. The package also includes optional modules for pandas and polars that convert between datetime series and ISO week strings, plus pydantic integration for validation. A distinctive feature is support for custom offsets—you can shift the week boundary by a timedelta to work with non-standard week definitions. It requires Python 3.10+ and has no mandatory runtime dependencies; pandas, polars, and pydantic are optional. Use it for: - Convert a datetime series to ISO week format for reporting or data aggregation in pandas or polars workflows. - Parse and validate ISO week strings in API payloads or configuration files using pydantic models. - Perform week-based arithmetic without manual datetime manipulation. - Check if a given date falls within a specific ISO week using containment operators. - Work with custom week boundaries by applying a timedelta offset to the standard ISO definition. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Parses and manipulates ISO Week date strings in YYYY-WNN and YYYY-WNN-D formats through dedicated classes, with optional integration for pandas, polars, and pydantic. Yes. Low install friction, no mandatory dependencies, active maintenance, MIT license, and zero known vulnerabilities make this a safe choice. Install it if you regularly work with ISO week formats or need to integrate week-based logic into pandas, polars pipelines, or pydantic validation. ## Install pip install iso-week-date uv add iso-week-date poetry add iso-week-date ## Installing iso-week-date Before you install: Low friction: pure Python wheel with no runtime dependencies. Active maintenance with recent release (2026-04-01), last commit 2026-08-01, and support for current Python versions (3.10–3.14). License in practice: MIT license is permissive; you can use, modify, and distribute this package freely with minimal restrictions. Quickstart: pip install iso-week-date from iso_week_date import IsoWeek, IsoWeekDate week = IsoWeek.from_string('2023-W01') week_date = IsoWeekDate.from_string('2023-W01-D') Requires Python 3.10 or later. Optional: pandas or polars for dataframe utilities; pydantic>=2.40 for validation integration. Verify before relying: - Performance characteristics when working with large series of ISO week dates. - Specific behavior of custom offset feature and whether it handles all edge cases correctly. - Whether the package handles leap weeks and other ISO 8601 edge cases. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 291.0K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags ISO week date parsing, week format conversion, week number handling, ISO week utilities, pandas week date support, polars week date support, pydantic week validation, date-time, data-validation [View on SkillFed](https://skillfed.io/packages/iso-week-date) · [View on PyPI](https://pypi.org/project/iso-week-date/)