I'm trying to use vobject, without success, to get a list of datetime objects for all event occurrences (see the RRULE paramether that sets the event to be repeated daily until a date) for a given vCalendar, which seems to be well-formatted (apparently):
BEGIN:VCALENDAR
CALSCALE:GREGORIAN
PRODID:iCalendar-Ruby
VERSION:2.0
BEGIN:VEVENT
DTEND:20110325T200000
DTSTAMP:20110926T135132
DTSTART:20110325T080000
EXDATE:
RRULE:FREQ=DAILY;UNTIL=20110331;INTERVAL=1
SEQUENCE:0
UID:2011-09-26T13:51:32+02:[email protected]
END:VEVENT
END:VCALENDAR
Documentation is not really friendly, and google results are scarce...Any idea or example? (the example can be for vobject or any other library or method).
Thanks!
H.
The VCALENDAR object, as supplied, is not strictly valid: the EXDATE property must have one or more date-time or date values (see 3.8.5.1. Exception Date-Times).
Despite that, vobject parses the data successfully, ending up with an empty list of exceptions in the VEVENT object.
To get the list of occurrences, try:
If we add a valid EXDATE property value, like
re-parse the string, and examine the RRULE set again, we get:
which is correctly missing the 27th March, as requested.