kalendar

Datetime extensions for dekadal data


License
GPL-3.0
Install
pip install kalendar==0.1

Documentation

kalendar: datetime.date extension for climate date measurements

license Test Status PyPI Status Documentation Status Coverage Status pre-commit Code style: black

In climatology, data is often reported in multi-day formats, such as dekads (a 10 day definition) or pentads (a 5 day definition). kalendar is a Python package with datetime.date extensions for dekadal and pentadal calendar definitions that make it easier to work with such climate data.

Installing

Install and update using pip:

pip install kalendar

Usage

The dekadal and pentadal classes are simple subclasses with convenient constructors for creating the class from datetime objects (and inherited constructors from datetime.date), methods for addition and subtraction, and converting back to datetime.date objects.

from kalendar import Dekad, Pentad
d = Dekad(2022, 1)
p = Pentad(2013, 51)

See the documentation for full examples.

Contributing

For guidance on setting up a development environment, see the contributing guidelines

Links