This library calculates recurrence times of events, todos, alarms, and journals based on the iCalendar RFC5545 specification. It provides a convenient way to expand recurring events within a given time range from an iCalendar object. The current version is 3.8.1, with a regular release cadence as evidenced by frequent updates.
pip install recurring-ical-eventsVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to parse an iCalendar string, extract a recurring event, and then expand its occurrences within a specified date range using the `recurring_ical_events` library. It uses `icalendar` for parsing the base calendar and `datetime` for defining the period.
If you need to include events exactly on the end date, adjust your `end` datetime to be one unit (e.g., one second or one day) after your desired inclusive end.
Explicitly set `DTSTART` and `DTEND` with `TZID` for all events where timezone certainty is critical, or ensure your local system timezone matches expectations, especially when dealing with events lacking explicit timezone information.
Upgrade your Python environment to 3.8 or a later version to use `recurring-ical-events` v3.0.0 and above.
Update your code to use the new chained method call: `recurring_ical_events.of(calendar).between(start_date, end_date)`.
Prefer `datetime.timezone.utc` or `zoneinfo.ZoneInfo` for defining timezone-aware datetimes when interacting with the library, especially in new code.
Install the module using pip: 'pip install recurring-ical-events'.
Use the correct function to parse the calendar, such as 'recurring_ical_events.icalendar.Calendar'.
Ensure the iCalendar file is correctly parsed and the resulting object is not 'None' before calling 'between'.
Verify the recurrence rule string adheres to the iCalendar RFC 5545 specification and correct any formatting errors.
Check the module's documentation for the correct import statements and available functions.