Hi Patrick, On 22.06.2012, at 11:32, Patrick Ohly wrote:
>> The original Evolution event has this: >> RRULE:BYDAY=TU;BYSETPOS=2;COUNT=2;FREQ=MONTHLY;WKST=SU >> >> [...] >> >> Are these type of recurrences supported with Evolution? > > In Evolution, yes, in libsynthesis, no. I can reproduce the problem and > noticed that the code (src/sysync/rrules.cpp, RRULE2toInternal()) bails > out because it doesn't recognize the "BYSETPOS" keyword. > > Lukas, was that a conscious decision, perhaps because it cannot be > supported in combination with vCalendar 1.0, or just an oversight? What > would it take to support that? I don't really know, because the iCalendar 2.0 RRULE parser was a contribution from someone years ago. But for certain, many things from the iCalendar 2.0 RRULEs can's be mapped to vCalendar 1.0 and also probably not to the current internal representation (the RR_xxx fields). I guess the 2.0 implementation was done more or less along what the 1.0 implementation had already offered. However, "second tuesday in month" type rules are supported, albeit in a slightly different form: RRULE:FREQ=MONTHLY;BYDAY=2TU;COUNT=2; (second tuesday in month) It also works relative to the end of the month, e.g. RRULE:FREQ=MONTHLY;BYDAY=-1MO;COUNT=2; (last monday in month) For full BYSETPOS support (which also allows to pick the Nth match from groups, like "last workday in month") the RR_xxx model would need to be extended, and the result would no longer be convertible into vCalendar 1.0. But maybe it would already help to add limited BYSETPOS support to catch the cases that actually are only different forms of describing recurrences that ARE supported in the RR_xxx model and vCalendar 1.0. Which IMHO is specifically BYSETPOS lists in conjunction with a single entry BYDAY (like in the RRULE from the original posting). Best Regards, Lukas Zeller _______________________________________________ os-libsynthesis mailing list os-libsynthesis@synthesis.ch http://lists.synthesis.ch/mailman/listinfo/os-libsynthesis