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: between breaks if RDATE is an interval #113

Closed
3 tasks
natashamm opened this issue Sep 6, 2023 · 4 comments
Closed
3 tasks

bug: between breaks if RDATE is an interval #113

natashamm opened this issue Sep 6, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@natashamm
Copy link

natashamm commented Sep 6, 2023

Describe the bug

between breaks if RDATE is an interval. I'm not sure if it is an issues with dateutil or recurring events.

To Reproduce

import datetime
import recurring_ical_events
import pytz

today = datetime.datetime.now(pytz.timezone("America/Vancouver")).date()
future = today + datetime.timedelta(days=365)
for event in cal_i.walk("VEVENT") + cal_i.walk("VFREEBUSY"):
    if event.has_key('RDATE'):
        if (event.has_key('RDATE')):
            recurring_ical_events.of(event).between(today - datetime.timedelta(days=60), future)

ICS file

BEGIN:VCALENDAR
VERSION:2.0
X-WR-CALNAME;VALUE=TEXT:Test RDATE
BEGIN:VTIMEZONE
TZID:America/Vancouver
BEGIN:STANDARD
DTSTART:20221106T020000
TZOFFSETFROM:-0700
TZOFFSETTO:-0800
RDATE:20231105T020000
TZNAME:PST
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:20230312T020000
TZOFFSETFROM:-0800
TZOFFSETTO:-0700
RDATE:20240310T020000
TZNAME:PDT
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
UID:1
DESCRIPTION:Test RDATE
DTSTART;TZID=America/Vancouver:20230920T120000
DTEND;TZID=America/Vancouver:20230920T140000
EXDATE;TZID=America/Vancouver:20231220T120000
RDATE;VALUE=PERIOD;TZID=America/Vancouver:20231213T120000/20231213T140000
RRULE:FREQ=MONTHLY;COUNT=9;INTERVAL=1;BYDAY=+3WE;B/YMONTH=1,2,3,4,5,9,10,11,
 12;WKST=MO
SUMMARY:Test RDATE
END:VEVENT

END:VCALENDAR

Version:

2.0.2


We're using [Polar.sh](https://polar.sh/niccokunzmann) 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
@natashamm natashamm added the bug Something isn't working label Sep 6, 2023
@niccokunzmann
Copy link
Owner

Thanks for reporting this @natashamm! #74 is related. I like that there is actually a use-case for this!

@niccokunzmann
Copy link
Owner

niccokunzmann commented Sep 18, 2023

Hi @natashamm. sorry - this was a wrong statement! I read EXRULE.

niccokunzmann added a commit to niccokunzmann/icalendar that referenced this issue Sep 19, 2023
niccokunzmann added a commit to niccokunzmann/icalendar that referenced this issue Sep 19, 2023
@niccokunzmann
Copy link
Owner

niccokunzmann commented Sep 24, 2023

@natashamm, this should be fixed in v2.1.0. Can you confirm this to close this issue?

@natashamm
Copy link
Author

Confirmed this is fixed. Thank you!

@niccokunzmann niccokunzmann mentioned this issue Nov 19, 2023
9 tasks
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