iso-8601 is a Python library to correctly parse a valid ISO 8601 datetime string.
At this stage, only datetime (or non-truncated date) formats are permitted.
Week number formats are not permitted in this version.
You can have an object in any of the following formats:
* YYYY-MM-DD
* YYYYMMDD
* YYYY-MM-DDThh
* YYYYMMDDThh
* YYYY-MM-DDThh:mm
* YYYYMMDDThhmm
* YYYY-MM-DDThh:mm:ss
* YYYYMMDDThhmmss
Additionally, to support some legacy systems, in all cases the T can be replaced by a space. Essentially, this just combines the two representations, which is not strictly according to the specification, but is commonly used.
Also supported is using an hour of 24 to mean midnight at the end of the day: this is converted to the python object of the next day's 00:00:00. Using a non-zero minute/second/fraction will raise a ValueError.
A fractional value may be appended to the last component of a time part. Appending it elsewhere will raise a ValueError.
Finally, only naive datetime objects are supported at this time. Timezones may not be included in the format string.
Product's homepage
Requirements:
· Python
What's New in This Release: [ read full changelog ]
· Added parse_date to module exports.