Skip to main content

PySO8601 aims to parse any ISO 8601 date, including Week dates, Ordinal dates, intervals and durations.

Project description

PySO8601 aims to be a better Python module to parse ISO 8601 dates. It is inspired by the iso8601 currently available in the pypi repository, however this module is designed to accept any valid ISO8601 formatted string:

Truncated representations (YYYYMM, YYMMDD, hhmmss, etc) are also accepted.

USAGE

import PySO8601
spam = PySO8601.parse('2011-01-01T14:32')
print spam # prints: 2011-01-01 14:32:00
eggs = PySO8601.parse('2010W052') # Week 5, day 2
print eggs # prints: 2010-02-01 00:00:00

For full examples on usage please review the specs in the source.

IMPORTANT NOTES

Durations:

Due to the difficult nature of working with calendars, for the moment years specified in the duration format are set to 365 days and months are set to 30 days. This will hopefully be addressed in the near future.

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

PySO8601-0.1.5.tar.gz (5.5 kB view details)

Uploaded Source

File details

Details for the file PySO8601-0.1.5.tar.gz.

File metadata

  • Download URL: PySO8601-0.1.5.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for PySO8601-0.1.5.tar.gz
Algorithm Hash digest
SHA256 ae5e5e06b90f0958238b0731dd05e97479bd3ea70117887a883e3d56231098c8
MD5 ca2bfee6fa674d2a671b6ff1970390ab
BLAKE2b-256 489526a6677c82f678f6a047b5536acd994b043e8bcb92d918c057949f5eab07

See more details on using hashes here.

Supported by

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