Utilities for parsing iso8601 intervals and durations
Project description
A set of utilities for parsing and validating iso8601 durations and intervals.
from iso8601utils import parsers
parsers.interval('2016-08-01T23:10:59.111Z/2016-08-08T00:13:23.001Z')
(datetime.datetime(2016, 8, 1, 23, 10, 59, 111), datetime.datetime(2016, 8, 8, 0, 13, 23, 1))
parsers.duration('P3Y6M4DT12H30M5S')
datetime.timedelta(1279, 45005)
from iso8601utils import validators
validators.interval('1999-12-31T16:00:00.000Z/P5DT7H')
True
validators.interval('23P7DT5H')
False
validators.duration('P3Y6M4W7DT12H30M5S')
True
validators.duration('23P7DT5H')
False
This project currently only supports utc times.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file iso8601utils-0.0.1.dev4.tar.gz.
File metadata
- Download URL: iso8601utils-0.0.1.dev4.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d5147153027f66845b9ff4ee6cc24ba2bebc6a90ef18a221c0186d28d8279d4e
|
|
| MD5 |
2663db7d9a9b30d6829e0584ba05670b
|
|
| BLAKE2b-256 |
5434da45851a963b5d52f2eaa19bff596b0c9d97a6985ce15fb76c0408692040
|
File details
Details for the file iso8601utils-0.0.1.dev4-py2-none-any.whl.
File metadata
- Download URL: iso8601utils-0.0.1.dev4-py2-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
011fbc43a083ba4f6fdb72c7270a189b981f4b2683dd72e9d3c9a9dee6b9f9c4
|
|
| MD5 |
0bf42895e8a68c338b566b520d7f98d8
|
|
| BLAKE2b-256 |
1062690f863e27cbcbbe38d6e88abb16bd83ebfebc95645d674d3f164d2c4386
|