Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: only first event returned if COUNT=-1 #128

Closed
zoifar opened this issue Mar 7, 2024 · 3 comments
Closed

bug: only first event returned if COUNT=-1 #128

zoifar opened this issue Mar 7, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@zoifar
Copy link

zoifar commented Mar 7, 2024

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. Fund with Polar
@zoifar zoifar added the bug Something isn't working label Mar 7, 2024
@niccokunzmann
Copy link
Owner

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 added a commit that referenced this issue Mar 17, 2024
niccokunzmann added a commit that referenced this issue Mar 17, 2024
@niccokunzmann
Copy link
Owner

I created #129 to fix this.

niccokunzmann added a commit that referenced this issue Mar 17, 2024
niccokunzmann added a commit that referenced this issue Mar 17, 2024
@niccokunzmann
Copy link
Owner

This is included in v2.1.3, soon to be published.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants