Questions regarding recurrence rules
Reinhold Kainhofer <[email protected]> Tue, 31 May 2005 15:59:12 +0200
| Newsgroups | gmane.ietf.calendar |
|---|---|
| Organization | FAM, Vienna University of Technology |
| Message-ID | <[email protected]> |
--nextPart4458638.c3C1h0Hl0G Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi Guys, I have few questions regarding details of recurrence rules of rfc 2445. (So= rry=20 if I may sound more clueless than I really am. I have my assumptions, but I= =20 don't want to influence any answers by bringing too much of my own argument= s=20 and thoughts). 1) About the BYDAY rule part: Let's start with some examples RRULE:FREQ=3DYEARLY;BYDAY=3D3SU Okay, that's the third sunday of the year. But what exactly is RRULE:FREQ=3DYEARLY;BYDAY=3D5SU;BYMONTH=3D2 Is this the fith sunday in the year, if it is also in february? Or is it th= e=20 fifth sunday in february? And it can be even less clear from rfc 2445. What= =20 is RRULE:FREQ=3DYEARLY;BYDAY=3D5SU;BYMONTH=3D2,7 Is this the fifth sunday of the year, if it's in either February or July?=20 Or is it the fifth sunday of both february and July? Or is it the fifth sunday of febrary and july together (i.e. in feb if the = feb=20 in a leap year has 5 sundays, or the first sunday of july in all other=20 years)? If you think it's the latter, think about the following rule: RRULE:FREQ=3DYEARLY;BYWEEKNO=3D4;BYDAY=3D5SU Is it the fifth sunday of all sundays that are in week #4? Or is it the fif= th=20 sunday of the year if it is also in week #4? Also, what does this rule mean: RRULE:FREQ=3DYEARLY;BYMONTH=3D3;BYDAY=3D2SU;BYYEARDAY=3D72 I suppose it doesn't mean the 72th day of the year, if that's the 2nd sunda= y=20 in March. Is there any way to express that recurrence in an RRULE? Also notice that rfc 2445 says "For example, within a MONTHLY rule, +1MO (or simply 1MO) represents the first Monday within the month, whereas -1MO represents the last Monday of the month. ". So what does=20 RRULE:FREQ=3DMONTHLY;BYYEARDAY=3D57,64;BYDAY=3D-1MO mean? The last monday of each month if it's also day #57 or #64 of the year= =20 (which the quote implies), or the last monday each month in the set of all= =20 days #57 and #64 of the year. In particular, in 2007, would the recurrence= =20 set be Feb 27 (=3D#57 of the year, and the last monday in february) without= any=20 occurence in march (march 5 is day #64, but it's not the last monday in the= =20 month, since rfc 2445 says -1MO means last monday of the month)? Or would i= t=20 be Feb 27 (day #57 of the year, and last monday of all dates that match the= =20 BYYEARDAY in the february interval) and March 4 ( day #64 of the year and=20 last monday of all dates in March that match the BYYEARDAY). 2) In Section 4.3.10 RFC 2445 says "The COUNT rule part defines the number = of=20 occurrences at which to range-bound the recurrence. The "DTSTART" property= =20 value, if specified, counts as the first occurrence.". So look at this rrul= e: DTSTART;TZID=3Dwhatever:20050530T120000 RRULE:FREQ=3DWEEKLY;COUNT=3D3;BYMONTH=3D6 The resulting recurrence dates would be 1) 20050530 2) 20050630 3) 20060630 Now if the DTSTART is not specified the quote from above would imply that t= he=20 start doesn't count as a recurrence, so looking at DTEND;TZID=3Dwhatever:20050530T150000 DURATION:PT3H RRULE:FREQ=3DWEEKLY;COUNT=3D3;BYMONTH=3D6 would give the following resulting recurrence dates? 1) 20050530 (DTSTART is always the first occurence, ) 2) 20050630 3) 20060630 4) 20070630 (DTSTART doesn't count towards COUNT) 3) About the DTSTART and recurrence rules: Is the DTSTART always taken to=20 match the rule (even if it doesn't fulfil the BY* parts)? In particular thi= s=20 is important for EXRULES: Is the DTSTART always the first occurence of the= =20 EXRULE? If that's the case, the DTSTART will always be excluded as soon as = at=20 least one EXRULE is present.=20 And since exceptions overrule inclusions, there's no way to have an occuren= ce=20 on the DTSTART in that case... Is this really the intended behaviour? Thanks a lot already for your clarifications / discussions. Cheers, Reinhold =2D-=20 =2D----------------------------------------------------------------- Reinhold Kainhofer, Vienna University of Technology, Austria email: [email protected], http://reinhold.kainhofer.com/ * Financial and Actuarial Mathematics, TU Wien, http://www.fam.tuwien.ac.a= t/ * K Desktop Environment, http://www.kde.org, KOrganizer / KPilot maintainer --nextPart4458638.c3C1h0Hl0G Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQBCnG2zTqjEwhXvPN0RAnrmAJoC75469V75U2n7hnfcOCzmC0d8oACdFkgM aZNpIFSDtTYLldJEFmptSN8= =acgE -----END PGP SIGNATURE----- --nextPart4458638.c3C1h0Hl0G--