
andrew at morphoss
Mar 25, 2012, 3:39 PM
Post #2 of 2
(223 views)
Permalink
|
|
Re: Retrieving recurring appointment instances through CalDAV library
[In reply to]
|
|
On Fri, 2012-03-23 at 10:42 +0000, Ben Dalby wrote: > Hello there, > > I have a calendar with a recurring appointment, which is sometimes > cancelled, and I want to be able to retrieve appointment instances > through a CalDAV library. > > Let's say the appointment is every week day, but in a certain week, > Thursday's instance is cancelled. So we have > MON > TUE > WED > FRI > > I'm trying to use the IP*Works .NET library to query DAViCal for just > such a calendar, but my problem is that although DAViCal sends back > the EXDATE parameter for the cancelled Thursday, it does not return > RDATE, EXRULE or RECURRENCE-ID. > > Example data returned from DAViCal: > BEGIN:VEVENT > UID:ff47aab4-9178-46e9-bcf5-253d10e61687 > DTSTART;TZID="GMT Standard Time":20120126T120000 DTEND;TZID="GMT Standard Time":20120126T123000 TRANSP:OPAQUE > X-OUTLOOK-BUSY-STATUS:2 > LAST-MODIFIED:20120321T142655Z > DTSTAMP:20120321T142655Z > CREATED:20120125T140343Z > SUMMARY:Test Recurring Event > CLASS:PUBLIC > RRULE:FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR > LOCATION:Test One Recurring One > SEQUENCE:2 > DESCRIPTION:Test One Recurring One Description > EXDATE;TZID="GMT Standard Time":20120202T120000 > END:VEVENT > > So at the moment it looks like I'd have to manually implement the > RRULE property to work out the instance dates myself, using EXDATE as > a filter on that list. > > So my questions are: > 1. Would it be possible/feasible to change DAViCal so that it sends > more information back, particularly RDATE? > 2. Has anyone used a CalDAV API library in any langugage that can > handle this scenario? > > I should say that I've already tried DDay.iCal, and it doesn't handled > EXDATE correctly. It must be possible, because the eM Client windows > app shows the right instances quite happily. Hi Ben, You can make a REPORT request for a period of time and receive the events with the RRULE/EXDATE/RDATE expanded server-side. Not sure if that's helpful to you. You claim that "although DAViCal sends back the EXDATE parameter for the cancelled Thursday, it does not return RDATE, EXRULE or RECURRENCE-ID" but normally DAViCal sends back exactly what data it has been given. Note that "EXRULE" is not supported by DAViCal in the server-side expansion of repeat rules - this is deprecated by RFC5545 and very little (if any) software supports it. RECURRENCE-ID only applies to instances which have been overridden, so most events don't contain a RECURRENCE-ID at all, especially if the override is simply a cancellation as that is handled by adding a date into the EXDATE property - as in the example you sent. I suspect that the "expand" property of the calendar-query report, defined in section 7.8 of RFC4791 is what you are after, though that will return you all instances of all events in a range, rather than the single event. But maybe that's also what you're after... :-) Cheers, Andrew. -- ------------------------------------------------------------------------ andrew (AT) morphoss (DOT) com +64(272)DEBIAN I just asked myself... what would John DeLorean do? -- Raoul Duke ------------------------------------------------------------------------
|