An ISO 8601 date/time/duration parser and formatter. Current version: 0.7.2, released on October 8, 2024. Maintained with a release cadence of approximately one year between major versions.
pip install isodateVerified import paths — ran on the pinned version, not inferred.
Parse an ISO 8601 date-time string into a Python datetime object.
Ensure input strings have fractional seconds within microsecond precision.
Upgrade to Python 3.7 or later.
pip install isodate
Ensure the date/time/duration string is in a valid ISO 8601 format, such as 'YYYY-MM-DDTHH:MM:SSZ' for datetime or 'P1Y2M3DT4H5M6S' for duration. Refer to the 'isodate' documentation for supported formats.
Import 'ISO8601Error' from 'isodate.isoerror' like this: from isodate.isoerror import ISO8601Error
No dependency data recorded yet.