Convert COARDS time specification to a datetime object.
Project description
This module converts between a given COARDS time specification and a Python datetime object, which is much more useful. Suppose you have an Array of values [1,2,3] and units “days since 1998-03-01 12:00:00”:
>>> a = [1, 2, 3] >>> units = 'days since 1998-03-01 12:00:00' >>> b = [from_udunits(value, units) for value in a] >>> print b[0].year 1998 >>> b[1] > b[0] True >>> print b[1] - b[0] 1 day, 0:00:00
The list b now contains objects which can be compared and manipulated in a consistent way.
The latest version is available in a Subversion repository.
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
coards-0.2.0.tar.gz
(4.3 kB
view details)
Built Distribution
coards-0.2.0-py2.4.egg
(8.9 kB
view details)
File details
Details for the file coards-0.2.0.tar.gz
.
File metadata
- Download URL: coards-0.2.0.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9674eb7c7264e0c96f7a850a36cdad7a33d145a523d30f89ef66227873f16f00 |
|
MD5 | 604d1a3d8b0ca812c921953bcafc6ced |
|
BLAKE2b-256 | 35cb47708307bccf7c654324c01ce83b4e1aa606a0f4b333a6ddde8f6fdb1348 |
Provenance
File details
Details for the file coards-0.2.0-py2.4.egg
.
File metadata
- Download URL: coards-0.2.0-py2.4.egg
- Upload date:
- Size: 8.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 78cb50ea53e79721b65221032c17c7d80f347565793bb9636482d2f7faff7c03 |
|
MD5 | 9f29a92ea54d3e10697752e64836f4f8 |
|
BLAKE2b-256 | f4dc35f9fa91c43460494142d8a53eb6190d9d1f5498295acc1a006b96022f28 |