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.
Install and update using pip:
pip install kalendar
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.
For guidance on setting up a development environment, see the contributing guidelines