This package provides helper functions to compute recurrences of events in a environment using the Zope Component Architecture (ZCA).
Copyright (c) 2013-2020 Michael Howitz
This package is licensed under the MIT License, see LICENSE.txt inside the package.
Contents
Register the package at the ZCA via ZCML:
<include package="icemac.recurrence" />
Compute recurrences. The example computes the 2nd Tuesday each month.:
>>> from icemac.recurrence import get_recurrences >>> get_recurrences( ... datetime=datetime(2015, 10, 13, 11, 15), ... period='nth weekday of month', ... interval_start=datetime(2015, 1, 1), ... interval_end=datetime(2015, 12, 31)) [datetime(2015, 10, 13, 11, 15), datetime(2015, 11, 10, 11, 15), datetime(2015, 12, 8, 11, 15)]
Supported recurrence periods:
daily
weekly
biweekly
nth weekday of month
nth weekday every other month
nth weekday from end of month
nth weekday from end of other month
yearly
Get the source code:
$ git clone https://github.com/icemac/icemac.recurrence
or fork me on: https://github.com/icemac/icemac.recurrence
You have to install tox onto your machine.
To run the tests yourself call:
$ tox