Skip to main content

Time-handling functionality from netcdf4-python

Project description

cftime

Time-handling functionality from netcdf4-python

Linux Build Status Windows Build Status PyPI package Coverage Status Tag Status Release Status Commits Status

News

For details on the latest updates, see the Changelog.

7/06/2020: version 1.2.0 released. New microsecond accurate algorithm for date2num/num2date contributed by @spencerkclark. Bugs fixed in masked array handling.

5/12/2020: version 1.1.3 released. Add isoformat method for compatibility with python datetime (issue #152). Make 'standard' default calendar for cftime.datetime so that dayofwk,dayofyr methods don't fail (issue #169).

4/20/2020: version 1.1.2 released. Code optimization, fix logic so only_use_cftime_datimes=False works as expected (issues #158 and #165).

3/16/2020: version 1.1.1 released. Fix bug in microsecond formatting, ensure identical num2date results if input is an array of times, or a single scalar (issue #143).

2/12/2020: version 1.1.0 released. cftime.datetime instances are returned by default from num2date (instead of returning python datetime instances where possible (issue #136)). num2pydate convenience function added (always returns python datetime instances, issue #134). Fix for fraction seconds in reference date string (issue #140). Added daysinmonth attribute (issue #137).

10/25/2019: version 1.0.4.2 released (fix for issue #126).

10/21/2019: version 1.0.4 released.

12/05/2018: version 1.0.3.4 released (just to fix a problem with the source tarball on pypi).

12/05/2018: version 1.0.3.1 released. Bugfix release (fixed issue with installation when cython not installed, regression on 32-bit platforms, workaround for pandas compatibility).

12/01/2018: version 1.0.3 released. Test coverage with coveralls.io, improved round-tripping accuracy for non-real world calendars (like 360_day).

10/27/2018: version 1.0.2 released. Improved accuracy (from approximately 1000 microseconds to 10 microseconds on x86 platforms). Refactored calendar calculations now allow for negative reference years. num2date function now more than an order of magnitude faster. months since units now allowed, but only for 360_day calendar.

08/15/2018: version 1.0.1 released.

11/8/2016: cftime was split out of the netcdf4-python package.

Quick Start

  • Clone GitHub repository (git clone https://github.com/Unidata/cftime.git), or get source tarball from PyPI. Links to Windows and OS X precompiled binary packages are also available on PyPI.

  • Make sure numpy and Cython are installed and you have Python 2.7 or newer.

  • Run python setup.py build, then python setup.py install (with sudo if necessary).

  • To run all the tests, execute py.test.

Documentation

See the online docs for more details.

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

cftime-1.2.0.tar.gz (52.8 kB view details)

Uploaded Source

Built Distributions

cftime-1.2.0-cp38-none-win_amd64.whl (197.9 kB view details)

Uploaded CPython 3.8 Windows x86-64

cftime-1.2.0-cp38-none-win32.whl (169.4 kB view details)

Uploaded CPython 3.8 Windows x86

cftime-1.2.0-cp38-cp38-manylinux1_x86_64.whl (266.4 kB view details)

Uploaded CPython 3.8

cftime-1.2.0-cp38-cp38-manylinux1_i686.whl (249.6 kB view details)

Uploaded CPython 3.8

cftime-1.2.0-cp38-cp38-macosx_10_9_x86_64.whl (281.5 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

cftime-1.2.0-cp37-none-win_amd64.whl (189.5 kB view details)

Uploaded CPython 3.7 Windows x86-64

cftime-1.2.0-cp37-none-win32.whl (163.8 kB view details)

Uploaded CPython 3.7 Windows x86

cftime-1.2.0-cp37-cp37m-manylinux1_x86_64.whl (281.6 kB view details)

Uploaded CPython 3.7m

cftime-1.2.0-cp37-cp37m-manylinux1_i686.whl (260.5 kB view details)

Uploaded CPython 3.7m

cftime-1.2.0-cp37-cp37m-macosx_10_9_x86_64.whl (275.1 kB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

cftime-1.2.0-cp36-none-win_amd64.whl (189.2 kB view details)

Uploaded CPython 3.6 Windows x86-64

cftime-1.2.0-cp36-none-win32.whl (163.7 kB view details)

Uploaded CPython 3.6 Windows x86

cftime-1.2.0-cp36-cp36m-manylinux1_x86_64.whl (282.3 kB view details)

Uploaded CPython 3.6m

cftime-1.2.0-cp36-cp36m-manylinux1_i686.whl (262.5 kB view details)

Uploaded CPython 3.6m

cftime-1.2.0-cp36-cp36m-macosx_10_9_x86_64.whl (291.1 kB view details)

Uploaded CPython 3.6m macOS 10.9+ x86-64

File details

Details for the file cftime-1.2.0.tar.gz.

File metadata

  • Download URL: cftime-1.2.0.tar.gz
  • Upload date:
  • Size: 52.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.8

File hashes

Hashes for cftime-1.2.0.tar.gz
Algorithm Hash digest
SHA256 ff0a175edda260357ff7d24a32bbe0a8c72eafd5f6a404ce487127f9d01836db
MD5 b3f153606e0264b8a939c2f5784cbb71
BLAKE2b-256 0337c8ca59b72bbfc34847edda47436aaffb626fcde49d772281621e0294ac62

See more details on using hashes here.

Provenance

File details

Details for the file cftime-1.2.0-cp38-none-win_amd64.whl.

File metadata

  • Download URL: cftime-1.2.0-cp38-none-win_amd64.whl
  • Upload date:
  • Size: 197.9 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.8

File hashes

Hashes for cftime-1.2.0-cp38-none-win_amd64.whl
Algorithm Hash digest
SHA256 abd3c113fc162c7ec7158274d8af8e6961e8933ce00444961eb4a2fac9a5ee38
MD5 18354c7d2930396c43905819a9a39be7
BLAKE2b-256 e17135dd2ff6ea7ee93c1d25ab6d499d199254bf6631d441b11f0af1c71fa974

See more details on using hashes here.

Provenance

File details

Details for the file cftime-1.2.0-cp38-none-win32.whl.

File metadata

  • Download URL: cftime-1.2.0-cp38-none-win32.whl
  • Upload date:
  • Size: 169.4 kB
  • Tags: CPython 3.8, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.8

File hashes

Hashes for cftime-1.2.0-cp38-none-win32.whl
Algorithm Hash digest
SHA256 51a72fbb202c7dc68be871607688b53d42c766bbc46a2847d57bb5c23bc4ba03
MD5 643b2d9e9b970e87880823c4c722a8e0
BLAKE2b-256 6f3e1e6b5a2d492c48e340ab9bf9ec8aefa05dfb18d144507dee019048ff1f5e

See more details on using hashes here.

Provenance

File details

Details for the file cftime-1.2.0-cp38-cp38-manylinux1_x86_64.whl.

File metadata

  • Download URL: cftime-1.2.0-cp38-cp38-manylinux1_x86_64.whl
  • Upload date:
  • Size: 266.4 kB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.8

File hashes

Hashes for cftime-1.2.0-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 5d5f04ae796a41def559c5023e4a4a65b3150ccf89176902a9707f696407ec0f
MD5 898db90c6710f7ae031d69ea90f8b35e
BLAKE2b-256 f5379713363cee10c2f17d72842ed5b7e871ec8c9acfc5a279bf21e17768c3e5

See more details on using hashes here.

Provenance

File details

Details for the file cftime-1.2.0-cp38-cp38-manylinux1_i686.whl.

File metadata

  • Download URL: cftime-1.2.0-cp38-cp38-manylinux1_i686.whl
  • Upload date:
  • Size: 249.6 kB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.8

File hashes

Hashes for cftime-1.2.0-cp38-cp38-manylinux1_i686.whl
Algorithm Hash digest
SHA256 d8ab191278b975fd2655c0774e5ba89bf59c5c414bfccc000396a61cadacc382
MD5 b1c74cf7a6a8c12d905781058f210740
BLAKE2b-256 5043d0c2c8850183e25fa5f02775a50c70114d2ab53f27e455e646410d28392b

See more details on using hashes here.

Provenance

File details

Details for the file cftime-1.2.0-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: cftime-1.2.0-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 281.5 kB
  • Tags: CPython 3.8, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.8

File hashes

Hashes for cftime-1.2.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 85e5f5fdbaeeacd9bb14a9ef063bf28afb1a22d1c2a0609073d1ef3c3782d4e9
MD5 aba18af8bb122e23f38feb08b9de156e
BLAKE2b-256 aae9b7361bc98f03d3acb2f8e63bb8f1d16e29cd6539750e2afc1510b47438f7

See more details on using hashes here.

Provenance

File details

Details for the file cftime-1.2.0-cp37-none-win_amd64.whl.

File metadata

  • Download URL: cftime-1.2.0-cp37-none-win_amd64.whl
  • Upload date:
  • Size: 189.5 kB
  • Tags: CPython 3.7, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.8

File hashes

Hashes for cftime-1.2.0-cp37-none-win_amd64.whl
Algorithm Hash digest
SHA256 4d20b09b33c2516ff6c09a812cf657159d0f4a7a0baf5f5a5da1e780d7b00905
MD5 063fa6a9a1cd6e41fde3afac05ce7cb2
BLAKE2b-256 68c89503e12f2fa8462fd65bd55c2c4b23a6ddd4cc464b2ee027d574ddf68abc

See more details on using hashes here.

Provenance

File details

Details for the file cftime-1.2.0-cp37-none-win32.whl.

File metadata

  • Download URL: cftime-1.2.0-cp37-none-win32.whl
  • Upload date:
  • Size: 163.8 kB
  • Tags: CPython 3.7, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.8

File hashes

Hashes for cftime-1.2.0-cp37-none-win32.whl
Algorithm Hash digest
SHA256 6033688568622a77614fc06329c05e2a7e2716f2ed298b3747a71f8fe7b99e23
MD5 0832a64011c54608923be304a71fb45d
BLAKE2b-256 0e3ea79a9d232578ecf5ee0f6c17ead34027a10c3fc6bf3f4d569ecbf77bc1a3

See more details on using hashes here.

Provenance

File details

Details for the file cftime-1.2.0-cp37-cp37m-manylinux1_x86_64.whl.

File metadata

  • Download URL: cftime-1.2.0-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 281.6 kB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.8

File hashes

Hashes for cftime-1.2.0-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 a3325f063fc4e81a1b415474e57be37810212bae42e0f7125b931e6a0ac6a445
MD5 b535e219e10c46163be1fcc0830f2d23
BLAKE2b-256 9e39ae29951ccc229136577029ee24b18d51c4ca225e41cf3daaea4ce17b6b24

See more details on using hashes here.

Provenance

File details

Details for the file cftime-1.2.0-cp37-cp37m-manylinux1_i686.whl.

File metadata

  • Download URL: cftime-1.2.0-cp37-cp37m-manylinux1_i686.whl
  • Upload date:
  • Size: 260.5 kB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.8

File hashes

Hashes for cftime-1.2.0-cp37-cp37m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 c1e1eeeaebbb2178e23aae3b9aa04c7fcf4993b79ac5bc378e989951828af262
MD5 d42a49ce9ea0866f50281160412b5513
BLAKE2b-256 64740237163c7ccb643f755ed7d92403cafd3d3e9f6636da297b8d277e12fc56

See more details on using hashes here.

Provenance

File details

Details for the file cftime-1.2.0-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: cftime-1.2.0-cp37-cp37m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 275.1 kB
  • Tags: CPython 3.7m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.8

File hashes

Hashes for cftime-1.2.0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 66c127f4c69a96565a56cf850039c6f89028607ab2f9aae13a6865c6270bf8de
MD5 bcd9260b0565a852354fcd5c609b1fcb
BLAKE2b-256 8fc4a37ea84a68a817641845379becfe7284598413cdcdc776103c50ba63a5b8

See more details on using hashes here.

Provenance

File details

Details for the file cftime-1.2.0-cp36-none-win_amd64.whl.

File metadata

  • Download URL: cftime-1.2.0-cp36-none-win_amd64.whl
  • Upload date:
  • Size: 189.2 kB
  • Tags: CPython 3.6, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.8

File hashes

Hashes for cftime-1.2.0-cp36-none-win_amd64.whl
Algorithm Hash digest
SHA256 478b4f20b3b62a5feae6b186bf43690b2c8ea8df20d36a2b4301c1ec018cd5f6
MD5 5c30aa8a6a6ce94335ac8e5c96b91f14
BLAKE2b-256 e9e784900cc5901e2255dd00cdca92f0700c962ed27aa906529c039a890130ce

See more details on using hashes here.

Provenance

File details

Details for the file cftime-1.2.0-cp36-none-win32.whl.

File metadata

  • Download URL: cftime-1.2.0-cp36-none-win32.whl
  • Upload date:
  • Size: 163.7 kB
  • Tags: CPython 3.6, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.8

File hashes

Hashes for cftime-1.2.0-cp36-none-win32.whl
Algorithm Hash digest
SHA256 d5bf8d5c9097dc27fcfd5b183025f8ce556d8986a402f838b9c1707249d5df6d
MD5 b15bd9f97c7ea10d902dbeecec100f85
BLAKE2b-256 345b82eafb2f67ca5fd642bd3ccd1b4989464fa248ea1b86fe988d8ae371d20a

See more details on using hashes here.

Provenance

File details

Details for the file cftime-1.2.0-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

  • Download URL: cftime-1.2.0-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 282.3 kB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.8

File hashes

Hashes for cftime-1.2.0-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 ddecde86c6b70893dcb055666eafd1403d660b7861200e2c2948ae32f9c0397a
MD5 e704d0c9720a8cbd23ad5e440b74969d
BLAKE2b-256 eb0f846488085d0f5517d79dfd7a12cd231ff87b94265a5bbfef62da56a6b029

See more details on using hashes here.

Provenance

File details

Details for the file cftime-1.2.0-cp36-cp36m-manylinux1_i686.whl.

File metadata

  • Download URL: cftime-1.2.0-cp36-cp36m-manylinux1_i686.whl
  • Upload date:
  • Size: 262.5 kB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.8

File hashes

Hashes for cftime-1.2.0-cp36-cp36m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 a91e213590dad45574f5f6560aee3bd89bea6f02c954c04d15e5f38b874b0b4f
MD5 37120f14fcc3af2f7b5ef2524d2a3f0d
BLAKE2b-256 f8fbe1572d53eab45df8ea3382a03431f08bca20cb8de76b1f348cc9d12bebca

See more details on using hashes here.

Provenance

File details

Details for the file cftime-1.2.0-cp36-cp36m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: cftime-1.2.0-cp36-cp36m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 291.1 kB
  • Tags: CPython 3.6m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.8

File hashes

Hashes for cftime-1.2.0-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 b18c75c073399d6e01adb7e471ad2baf409d23968767c8defa076c8b6b014f95
MD5 87418eefd3bca31e12acfaae74e3d184
BLAKE2b-256 bfed617de61de63077ab92f64a511fa25c4d203d974628d100a839d56487a100

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