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

Recurring event first instance not matching rrule #366

Closed
KrisLau opened this issue Mar 29, 2022 · 1 comment
Closed

Recurring event first instance not matching rrule #366

KrisLau opened this issue Mar 29, 2022 · 1 comment
Labels

Comments

@KrisLau
Copy link

KrisLau commented Mar 29, 2022

Kind of a weird problem but several of my recurring events seem to be acting strange. So for example, I created a MWF 6:30 - 7:30am recurring event with a dtstart of today(Tuesday) so the first instance should be tomorrow (Wednesday). But in generated ics file it is seems to be including today. Left is the first occurrence generated by the jakubroztocil/rrule package and the right is the generated iCal being used in outlook:
image

RRule used:

DTSTART:20220329T183000Z
RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,WE,FR;UNTIL=20220930T202400Z

Behaviour is also replicated when importing the ICS file into Google Calendars. Actual ICS file used in the screenshot: calendar.txt

I have an idea for a "fix" of sorts where I could just call rrule.all()[0] to get the first occurrence and use that as the start date but that seems extremely hacky hahah. Is this expected behavior with those rules or am I doing something wrong?

EDIT: Looks like there is a very old open issue on rrule (jkbrzt/rrule#84) that states that it doesn't comply with the official protocol. However, I am unsure how I would set a non inclusive (doesn't include DTSTART unless it actually matches rrule) DTSTART?

@sebbo2002
Copy link
Owner

No, you are doing everything right so far. There is currently no way to use start and end only as bounds for the rrules. For this, ical-generator would have to be able to parse and interpret these rules again, so I left that out explicitly (ical-generator allows not only to specify a rrule object, but also to pass a string, so I can't rely on a rrule-Object).

If you have any questions, feel free to reopen the ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants