Time-handling functionality from netcdf4-python
Actively maintained. Last release 7 weeks ago, commits in 15 of the last 26 weeks. A safe choice.
pip install cftimecftime
Time-handling functionality from netcdf4-python
News
For details on the latest updates, see the Changelog.
10/15/2026: Version 1.6.6.1 release. Includes free-threaded wheels.
9/15/2026: Version 1.6.6 release. Limited API compliant wheels (should work with python 3.15). New cftime calendar "tai".
10/13/2025: Version 1.6.5 release. Minor bugfixes/optimizations, wheels for python 3.14, no more wheels for 3.8/3.9.
6/7/2024: Version 1.6.4 release. Wheels for muslinux and aarch64, numpy 2.0 compatibility.
10/20/2023: Version 1.6.3 released. Support for python 3.12, cython 3.0, strptime formats without separators.
9/18/2022: Version 1.6.2 released. strptime method added, fix for num2date failure on empty integer array, date2num 'longdouble' keyword added. New wheel building workflow.
6/30/2022: Version 1.6.1 released. Fixes for numpy 1.23.0, updated CI/CD.
3/4/2022: Version 1.6.0 released. Big speed-ups for num2date, date2index bugfix for select != 'exact' when select='exact' works, fix for date2num with masked array inputs.
1/22/2022: Version 1.5.2 released (wheels for Apple M1 available on pypi for python 3.8,3.9 and 3.10). is_leap_year function added (issue #259).
10/31/2021: Version 1.5.1.1 released (new binary wheels for python 3.10).
10/1/2021: Version 1.5.1 released. Changed default behavior of proleptic_gregorian
to has_year_zero=T (since it is allowed in ISO-8601 and CF does not specify the
year zero convention for this calendar). Raise warning message when trying
to create a calendar that is not supported by CF version 1.9 (no years < 1
allowed for 'standard'/'gregorian' or 'julian' calendars).
Added support for "common_year" and "common_years" units for "noleap"
and "365_day" calendars.