Quantcast
Viewing latest article 27
Browse Latest Browse All 44

Python ical: get events for a day including recurring ones

Is there an easy way to get a day's events from an ical file in Python?

For non-recurring, one day events I have used something like

from icalendar import Calendarfor event in Calendar.from_ical(ical).walk('vevent'):    if edate > ref_ref_day_start and event.get('dtstart').dt < ref_day_end:        # code here

But recurring events only occur in walk once.

I can see how having an infinite event iteration for repeating events without end could be a problem. But still there must be an easier way than calculating the repetitions by myself, right?

(I can't find much documentation. I read the icalendar test related to recurring events but it doesn't seem to do anything like this).


Viewing latest article 27
Browse Latest Browse All 44

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>