[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Questions regarding recurrence rules



On Friday 03 June 2005 16:46, Laird Nelson wrote:
> > -----Original Message-----
> > From: owner-ietf-calendar@xxxxxxxxxxxx
> > [mailto:owner-ietf-calendar@xxxxxxxxxxxx] On Behalf Of
> > Reinhold Kainhofer
> > 2) All VTIMEZONEs (at least those used by Exchange, Apple's
> > iCal, and by libical and so by evolution, korganizer etc.)
> > use RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
>
> (Mr. Kainhofer is implying that they got it wrong; 

No, I'm not implying that it is wrong. I simply don't know how it's correct. 
That's why I'm asking here to get some clarification on how the rfc should be 
correctly interpreted.

Initially, I thought that -1SU always means the last sunday in the frequency. 
But after reading rfc 2445 over and over again (and after looking in the 
internet for examples and other comment), I don't think that this is the 
correct interpretation. Actually, I really think now that the correct 
behavior is that the n-th day in the the BYDAY rule is really relative to the 
set generated by BYMONTH, BYWEEKNO, BYYEARDAY, BYMONTHDAY and the weekday 
given in BYDAY.


> If this is correct and can be generalized, then it implies that BYDAY
> modifiers apply to the current set of evaluated occurrences, not to the
> FREQ.  

Actually, thinking a bit more about this: Such an interpretation (which I now 
tend to think is the right way) would mean that the +n/-n in the BYDAY is 
similar to the BYSETPOS values, only that it operates on a date-basis (i.e. 
before all times are evaluated, but after all rules for the date have been 
processed). To me that sounds as if there was some kind of redundancy 
involved here...
(Okay, there are some things that cannot be done with BYSETPOS alone, like the 
second-to-last wednesday and the last friday of the month.)


> The upshot is
> that I'm very confused.  Perhaps my recurrence rule expansion library will
> need to be written to operate in one of two different modes?

I'm in the process of rewriting our old recurrence class (which was originally 
written for vCalendar-style recurrences, and so was missing the BYSETPOS 
altogether, and it was impossible to include it without a complete rewrite), 
so I'd like to get everything right now rather than having to rewrite it 
again.

BTW, is there an FAQ about such issues with RFC 2445 somewhere? Maybe even a 
wiki page where I can add the answers to these questions myself (once we get 
a definitive answer)?

Cheers,
Reinhold
-- 
------------------------------------------------------------------
Reinhold Kainhofer, Vienna University of Technology, Austria
email: reinhold@xxxxxxxxxxxxx, http://reinhold.kainhofer.com/
 * Financial and Actuarial Mathematics, TU Wien, http://www.fam.tuwien.ac.at/
 * K Desktop Environment, http://www.kde.org, KOrganizer / KPilot maintainer

Attachment: pgp00005.pgp
Description: PGP signature