Skip to main content

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


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.1.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

coards-0.2.1-py2.4.egg (9.0 kB view details)

Uploaded Egg

File details

Details for the file coards-0.2.1.tar.gz.

File metadata

  • Download URL: coards-0.2.1.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for coards-0.2.1.tar.gz
Algorithm Hash digest
SHA256 680c7db4332bb297392cd1eb927045a5e83088b9655f386e13a5a1e98fa40c81
MD5 30eee06cf93f15291028ceb7a0f2500f
BLAKE2b-256 d6403095a997c289c1923178d509c9da9fb823457604e3fd5790b429f71cd200

See more details on using hashes here.

File details

Details for the file coards-0.2.1-py2.4.egg.

File metadata

  • Download URL: coards-0.2.1-py2.4.egg
  • Upload date:
  • Size: 9.0 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for coards-0.2.1-py2.4.egg
Algorithm Hash digest
SHA256 f61b00ec5ff3e24539a9a94d4b6717c06704826ff1884f50df179ade9b13f4c2
MD5 4f470496abc33bdee3efea5cc3e63839
BLAKE2b-256 3dd6b48f821d6d8c20c9c03b7a76bf623b6845f1f55c9c9b134703fa4401047d

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