bug: only first event returned if COUNT=-1
Closed this issue · 3 comments
zoifar commented
Describe the bug
only first event returned if COUNT=-1
To Reproduce
ical_string="""BEGIN:VCALENDAR
BEGIN:VEVENT
DTSTAMP:20231102T221721Z
DTSTART;VALUE=DATE:20231002
DTEND;VALUE=DATE:20231009
SUMMARY:test123
CATEGORIES:other
SUBCALENDAR-NAME:test
EVENT-ID:538924
EVENT-ALLDAY:true
RRULE:FREQ=WEEKLY;UNTIL=20240331;COUNT=-1;INTERVAL=4;BYDAY=MO
CREATED:20231102T221633Z
LAST-MODIFIED:20231102T221716Z
TRANSP:TRANSPARENT
STATUS:CONFIRMED
END:VEVENT
END:VCALENDAR"""
calendar = icalendar.Calendar.from_ical(ical_string)
events=recurring_ical_events.of(calendar).at(2023)
for event in events:
start = event["DTSTART"].dt
duration = event["DTEND"].dt - event["DTSTART"].dt
print("start {} duration {}".format(start, duration))
ICS file
BEGIN:VCALENDAR
BEGIN:VEVENT
DTSTAMP:20231102T221721Z
DTSTART;VALUE=DATE:20231002
DTEND;VALUE=DATE:20231009
SUMMARY:test123
CATEGORIES:other
SUBCALENDAR-NAME:test
EVENT-ID:538924
EVENT-ALLDAY:true
RRULE:FREQ=WEEKLY;UNTIL=20240331;COUNT=-1;INTERVAL=4;BYDAY=MO
CREATED:20231102T221633Z
LAST-MODIFIED:20231102T221716Z
TRANSP:TRANSPARENT
STATUS:CONFIRMED
END:VEVENT
END:VCALENDAR
Expected behavior
all events returned
Console output
start 2023-10-02 duration 7 days, 0:00:00
Version:
2.1.2
Additional context
This is generated by atlassian confluence calendar when future instances of the event are deleted.
We're using Polar.sh so you can upvote and help fund this issue. We receive the funding once the issue is completed & confirmed by you. Thank you in advance for helping prioritize & fund our work.
niccokunzmann commented
Thanks for reporting this! It looks like it should be possible to implement a tested fix for this. Would you like to give it a go?
niccokunzmann commented
I created #129 to fix this.
niccokunzmann commented
This is included in v2.1.3, soon to be published.