Skip to main content

Simple module to parse ISO 8601 dates

Project description

Simple module to parse ISO 8601 dates

This module parses the most common forms of ISO 8601 date strings (e.g. 2007-01-14T20:34:22+00:00) into datetime objects.

>>> import iso8601
>>> iso8601.parse_date("2007-01-25T12:00:00Z")
datetime.datetime(2007, 1, 25, 12, 0, tzinfo=<iso8601.iso8601.Utc ...>)
>>>

Changes

0.1.4

  • The default_timezone argument wasn’t being passed through correctly, UTC was being used in every case. Fixes issue 10.

0.1.3

  • Fixed the microsecond handling, the generated microsecond values were way too small. Fixes issue 9.

0.1.2

  • Adding ParseError to __all__ in iso8601 module, allows people to import it. Addresses issue 7.

  • Be a little more flexible when dealing with dates without leading zeroes. This violates the spec a little, but handles more dates as seen in the field. Addresses issue 6.

  • Allow date/time separators other than T.

0.1.1

  • When parsing dates without a timezone the specified default is used. If no default is specified then UTC is used. Addresses issue 4.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iso8601-0.1.4.tar.gz (4.7 kB view details)

Uploaded Source

Built Distributions

iso8601-0.1.4-py2.5.egg (7.6 kB view details)

Uploaded Egg

iso8601-0.1.4-py2.4.egg (7.7 kB view details)

Uploaded Egg

File details

Details for the file iso8601-0.1.4.tar.gz.

File metadata

  • Download URL: iso8601-0.1.4.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for iso8601-0.1.4.tar.gz
Algorithm Hash digest
SHA256 7a28ccdfb316960431aa7f589f71cb10e0675917e36f6d718d9c03ec6e97f60d
MD5 f63c17a1786b9fe48d05b43d61970f85
BLAKE2b-256 ee9a4bb4a3c69bd676296dd68fa98a99596717cd275351be8ffee714711de169

See more details on using hashes here.

File details

Details for the file iso8601-0.1.4-py2.5.egg.

File metadata

  • Download URL: iso8601-0.1.4-py2.5.egg
  • Upload date:
  • Size: 7.6 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for iso8601-0.1.4-py2.5.egg
Algorithm Hash digest
SHA256 14daf493da034989d2879b33bdc4b48f8ff21b7bcb8b82a8bb5018a4bdabac14
MD5 8d5cd7768ce66e9ee93be2860e045ef7
BLAKE2b-256 f15dda818438cdaa38d92368c55524e43bcf338bcf51cc7579bad1324f751f8a

See more details on using hashes here.

File details

Details for the file iso8601-0.1.4-py2.4.egg.

File metadata

  • Download URL: iso8601-0.1.4-py2.4.egg
  • Upload date:
  • Size: 7.7 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for iso8601-0.1.4-py2.4.egg
Algorithm Hash digest
SHA256 35c66af902b351bd01e7b2736dfa03788a127a8f538e40db742cedd5cc6e6c8d
MD5 1d06b7c176706c8da8ac403da829c639
BLAKE2b-256 353bcab3b62f13be646382e7128dc804c784285e4a9395abaaa52b75cbd900f6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page