NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #1432 most downloaded on PyPI
A library for parsing ISO 8601 strings.
Last release 1 years ago
18 Apr 2025
Ships unpredictably
gaps range from 2 weeks to 3.9 years
Some releases are documented
notes for 15 of 38 stable releases
Nothing withdrawn
no release was ever pulled
14 years old
38 releases · first in 2013
Moved to Codeberg: https://codeberg.org/nielsenb-jf/aniso8601
Release date: 2025-04-18
Moved to Codeberg: https://codeberg.org/nielsenb-jf/aniso8601
year_range_check will only shift 0s in from the left for year strings of length 2. Since parse_date throws an IsoFormatError for year strings of lengths other than 2 or 4 this shouldn't significantly change any public API consumers.
Specify changelog location in setup.py
Change to Woodpecker CI
Add a CI pipeline to test builders when a tag is pushed
Reduced accuracy representations of years when parsing a calendar date are now only allowed to be [YY] (see 31 _)
Release date: 2025-01-09
Reduced accuracy representations of years when parsing a calendar date are now only allowed to be [YY] (see 31)
No longer specify a Python interpreter version to Black
Cleanup unsupported Pylint configuration options
Fix used-before-assignment errors
Fix coverage issue caused by unreachable conditional in _parse_interval_end
One column per quarter.
Development requirements handled by extras_require (install with pip install -e .[dev])
Release date: 2021-03-01
Development requirements handled by extras_require (install with pip install -e .[dev])
Pre-commit hooks, managed with pre-commit (install with pre-commit install)
Add readthedocs.yaml to make configuration explicit
Code formatted with Black
Imports sorted with isort
Following Keep a Changelog for this and future CHANGELOG entries
Removed python-dateutil from BuildRequires in specfile as they are no longer required since calendar level duration building was split to a separate project (6.0.0)
Heading level of top of CHANGELOG
Parsing prescribed durations with only hour and second time components (see PR 14)
Parsing prescribed durations with only year and day components
Add support for concise interval format (see 27 _)
Release date: 2021-02-18
Add support for concise interval format (see 27)
Add explicit bounds of [000, 366] to day of year component _parse_ordinal_date, this adds the same limits to dates of the format YYYYDDD or YYYY-DDD when using parse_date
Add range_check_date, range_check_time, range_check_duration, range_check_repeating_interval, and range_check_timezone range checking class methods to BaseTimeBuilder there are no datetime or non-repeating interval check function as they are made of already checked parts
PythonTimeBuilder now calls the appropriate range check functions using the range_check_date, range_check_time, range_check_duration, range_check_repeating_interval, and range_check_timezone methods defined in aniso8601.builders
Add range_check_duration to PythonTimeBuilder which calls BaseTimeBuilder.range_check_duration and performs additional checks against maximum timedelta size
Add range_check_interval to PythonTimeBuilder which handles building concise dates and performs additional checks against maximum timedelta size
Add get_datetime_resolution which behaves like get_time_resolution but accepts a ISO 8601 date time as an argument, return value is a TimeResolution
Add exceptions.RangeCheckError as a parent type of all failures in the range check methods, it descends from ValueError
Add get_duration_resolution which behaves like other resolution helpers, return value is a DurationResolution
Add get_interval_resolution which behaves like other resolution helpers, return value is a IntervalResolution
Negative durations now fail at the parse step and simply raise ISOFormatError, calling a PythonTimeBuilder.build_duration directly with a negative duration component will yield an ISOFormatError in the range check
Raise DayOutOfBoundsError if calendar day exceeds number of days in calendar month
Raise DayOutOfBoundsError if ordinal day exceeds number of days in calendar year (366 now raises DayOutOfBoundsError in non-leap year)
Raise ISOFormatError when date or time string contains extra whitespace
Raise ISOFormatError on multiple fraction separators (comma, full-stop) in a time string
Raise ISOFormatError when duration contains multiple duration designators ("P"), or time designators ("T")
PythonTimeBuilder.build_duration raises YearOutOfBoundsError, MonthOutOfBoundsError, WeekOutOfBoundsError, HoursOutOfBoundsError, MinutesOutOfBoundsError, or SecondsOutOfBoundsError when a given duration component would result in a timedelta that would exceed the maximum size
Raise ISOFormatError if number of delimiters is not exactly 1 in parse_interval
Raise ISOFormatError when either part of an interval string before of after the delimiter is empty
Raise YearOutOfBoundsError in PythonTimeBuilder.build_interval if an interval with a duration would exceed the maximum or minimum years for Python date objects
Simplify parse_date, build_date will now be called with explicit None arguments instead of date components not in the parsed string excluded from the call
Change get_date_resolution to call parse_date and return the resolution based on the smallest parsed component
Simplify parse_time, build_time will now be called with explicit None arguments instead of date components not in the parsed string excluded from the call
Change get_time_resolution to call parse_time and return the resolution based on the smallest parsed component
TupleBuilder now builds DateTuple, TimeTuple, DatetimeTuple, DurationTuple, IntervalTuple, RepeatingIntervalTuple and TimezoneTuple namedtuples
Simplify parse_duration, build_duration will now be called with explicit None arguments when components of a prescribed duration are not present in the ISO 8601 duration string instead of being excluded from the call
Remove unused decimalfraction.find_separator
Remove unused PythonTimeBuilder._split_to_microseconds
Removed NegativeDurationError
Update on Python 2 support: Python 2 support was slated to be removed in 7.0.0 but was not, it will remain until a test fails on Python 2 but not Python 3
Using Setuptools to run tests (python setup.py tests) will be removed in the next major or minor version (either 9.1.0, 10.0.0)
Deprecate running tests with python setup.py tests as the test suite support in Setuptools is deprecated _
Release date: 2021-01-29
Add version to __init__.py
Cleaner reading of README.rst into the long_description field of setup.py
Define long_description_content_type as text/x-rst
Simplify Sphinx configuration
Add compat.is_string method, returns True for str, unicode types, False otherwise, used to fix 28
Deprecate running tests with python setup.py tests as the test suite support in Setuptools is deprecated
Empty string arguments to get_date_resolution and parse_date now raise ISOFormatError, fixes 26 _
Release date: 2020-11-30
Empty string arguments to get_date_resolution and parse_date now raise ISOFormatError, fixes 26
None and non-string arguments to get_date_resolution and parse_date now raise ValueError
Empty string arguments to parse_duration now raise ISOFormatError
None and non-string arguments to parse_duration now raise ValueError
Empty string arguments to parse_interval and parse_repeating_interval now raise ISOFormatError
None and non-string arguments to parse_interval and parse_repeating_internval now raise ValueError
Empty string arguments to get_time_resolution and parse_time now raise ISOFormatError
None and non-string arguments to parse_time now raise ValueError
None and non-string arguments to parse_timezone now raise ValueError
Empty string arguments to parse_datetime now raise ISOFormatError
None and non-string arguments to parse_datetime now raise ValueError
Missing delimiter in datetime strings when calling parse_datetime now raises ISOFormatError
Missing delimiter in regular and repeating interval strings when calling parse_interval and parse_repeating_interval now raises ISOFormatError
get_time_resolution now correctly throws ISOFormatError when a time component has too many characters in a time using ":" as a separator
Handle ',' character as a fractional separator, as required by 4.2.2.4, see PR 12 _
Handle all fractional components as an integer number of microseconds, eliminating rounding issues, fixes #24 _
Release date: 2019-06-11
Handle all fractional components as an integer number of microseconds, eliminating rounding issues, fixes #24
Remove previously deprecated built in version of relativetimebuilder _
Release date: 2019-03-08
Remove previously deprecated built in version of relativetimebuilder
Python 2 support will be removed in 7.0.0
Add relativetimebuilder _ as an explicit requirement
Make python-dateutil _ dependency explicit
Previously deprecated relative keyword removed
Release date: 2019-03-01
Previously deprecated relative keyword removed
Move builders to builders module
aniso8601.builder.PythonTimeBuilder -> aniso8601.builders.python.PythonTimeBuilder
aniso8601.builder.RelativeTimeBuilder -> aniso8601.builders.relative.RelativeTimeBuilder
aniso8601.builder.TupleBuilder -> aniso8601.builders.TupleBuilder
UTCOffset moved out of builder (aniso8601.builder.UTCOffset -> aniso8601.utcoffset.UTCOffset)
Fractional arguments are now handled with greater precision (discussion <https://bitbucket.org/nielsenb/aniso8601/issues/21/sub-microsecond-precision-is-lost-when>_)
When build_time is called with only hh 24<=hh<25, a MidnightBoundsError is raised, this used to be a HoursOutOfBoundsError
Promote interval components to datetime objects if the given duration has second or microsecond resolution, or if the duration tuple has hour, minute, or second components
Before promotion would only happen if the duration tuple had hour, minute, or second components
The built in RelativeTimeBuilder is deprecated, it will be removed in aniso8601 6.0.0, use RelativeTimeBuilder from relativetimebuilder instead
Add support for running tests via setuptools (python setup.py test)
Release date: 2019-01-08
Update copyright date
Drop support for distutils
Make tests package importable
Add support for running tests via setuptools (python setup.py test)
Explicitly exclude .pyc, __pycache__ from bundles
Use unittest.mock with Python 3
*Release date: 2018-10-25* Changes ------- * Correct date in CHANGELOG
Release date: 2018-10-25
Correct date in CHANGELOG
relative keyword argument deprecated for all functions where it was available (parse_duration, parse_interval), it will be removed in aniso8601 5.0.0
Release date: 2018-10-25
All parse functions now take an optional builder argument allowing for changing output format, PythonTimeBuilder is used by default maintaining compatbility with previous versions (discussion)
Custom error types, especially ISOFormatError are raised for all known format errors (issue 18)
relative keyword argument deprecated for all functions where it was available (parse_duration, parse_interval), it will be removed in aniso8601 5.0.0
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →