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 = [parseUdunits(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.1.4.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

coards-0.1.4-py2.4.egg (8.4 kB view details)

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for coards-0.1.4.tar.gz
Algorithm Hash digest
SHA256 ffbabe5bcc324951e366e75ca4aa325a1dfd9784bb415e1da90104b8a3366fe7
MD5 53d2c32c8e9e1c0489b09d15aebb5661
BLAKE2b-256 f2c6046040213939f4d66bef1fa1aaee2c461ac0ed8a1cd43ff76684a61e97d9

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: coards-0.1.4-py2.4.egg
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for coards-0.1.4-py2.4.egg
Algorithm Hash digest
SHA256 ef6b4adb1e7999c23500d1c323ca981aa5a6391454284f12c0628eb07fc8599f
MD5 58a086c7e787f542a7a58b7c066a35d4
BLAKE2b-256 577a3caecc55890a31e1a6400a6974f9e49aa5ad4193687458ef1a91bad61909

See more details on using hashes here.

Provenance

Supported by

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