summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcalendar-cli.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/calendar-cli.py b/calendar-cli.py
index cec2e4d..933e330 100755
--- a/calendar-cli.py
+++ b/calendar-cli.py
@@ -558,6 +558,8 @@ def calendar_agenda(caldav_conn, args):
rrule = rrulestr(event.rrule.value, dtstart=event.dtstart.value, tzids=tzinfo)
dtstart_generator = rrule.xafter(search_dtstart)
for instance_dtstart in dtstart_generator:
+ if instance_dtstart > search_dtend:
+ break
repeated_events_ = find_calendar(caldav_conn, args).date_search(instance_dtstart, search_dtend, expand=True)
for event_cal_ in repeated_events_:
repeated_events__ = event_cal_.instance.components()