django_ical.utils

Utility functions to build calendar rules.

django_ical.utils.build_rrule(count=None, interval=None, bysecond=None, byminute=None, byhour=None, byweekno=None, bymonthday=None, byyearday=None, bymonth=None, until=None, bysetpos=None, wkst=None, byday=None, freq=None)

Build rrule dictionary for vRecur class.

Parameters:
  • count – int
  • interval – int
  • bysecond – int
  • byminute – int
  • byhour – int
  • byweekno – int
  • bymonthday – int
  • byyearday – int
  • bymonth – int
  • until – datetime
  • bysetpos – int
  • wkst – str, two-letter weekday
  • byday – weekday
  • freq – str, frequency name (‘WEEK’, ‘MONTH’, etc)
Returns:

dict

django_ical.utils.build_rrule_from_dateutil_rrule(rule)

Build rrule dictionary for vRecur class from a dateutil rrule.

Dateutils rrule is a popular implementation of rrule in python. https://pypi.org/project/python-dateutil/ this is a shortcut to interface between dateutil and icalendar.

django_ical.utils.build_rrule_from_recurrences_rrule(rule)

Build rrule dictionary for vRecur class from a django_recurrences rrule.

django_recurrences is a popular implementation for recurrences in django. https://pypi.org/project/django-recurrence/ this is a shortcut to interface between recurrences and icalendar.

django_ical.utils.build_rrule_from_text(rrule_str)

Build an rrule from a serialzed RRULE string.