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

Problem with Event rrule format #421

Closed
Tracked by #443
tyctor opened this issue Sep 26, 2022 · 3 comments
Closed
Tracked by #443

Problem with Event rrule format #421

tyctor opened this issue Sep 26, 2022 · 3 comments

Comments

@tyctor
Copy link

tyctor commented Sep 26, 2022

trying to create recuring event, but export to ical fails:

event = icalendar.Event()
event.add("rrule", {'FREQ': 'MONTHLY', 'WKST': 'MO', 'BYDAY': '+1TU,+3TU'})
event.to_ical()

...
ValueError: Expected weekday abbrevation, got: +1TU,+3TU

but icalendar validator on https://icalendar.org/validator.html claims that this rrule is valid

@niccokunzmann
Copy link
Member

Thanks for reporting this! You would probably expect the event to be created. What would the valid rrule string or ics string look like?

@tyctor
Copy link
Author

tyctor commented Sep 27, 2022

hi,
valid rrule string should be
RRULE:FREQ=MONTHLY;WKST=MO;BYDAY=+1TU,+3TU

in words
Every month on the 1st Tuesday and 3rd Tuesday

@tyctor
Copy link
Author

tyctor commented Sep 27, 2022

oh, understand, value must be list

this is ok:

event = icalendar.Event()
event.add("rrule", {'FREQ': 'WEEKLY', 'WKST': 'MO', 'BYDAY': ['+1TU', '+3TU']})
event.to_ical()

b'BEGIN:VEVENT\r\nRRULE:FREQ=WEEKLY;BYDAY=+1TU,+3TU;WKST=MO\r\nEND:VEVENT\r\n'

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

No branches or pull requests

2 participants