Subject: [Ietf-calsify] Struggling with BYxxx

From: mrdemeanour at jackpot.uk.net (Mr. Demeanour)
Date: Sat Jun 23 04:37:58 2007

Hi,

What is the correct interpretation of a YEARLY rule in which BYMONTH and
BYYEARDAY are both specified?

I can't find this described anywhere, but my interpretation would be to
/expand/ in accordance with the BYMONTH part, and then to /expand/ in
accordance with the BYYEARDAY part. So consider the rule

     RRULE:FREQ=YEARLY;BYMONTH=6,12;BYMONTHDAY=25;BYYEARDAY=1

I would expect this rule to expand to two Christmases per year, on the
25th of June and December respectively, and one New Year's Day.

Is that correct?

Thanks,
Jack.

---

From: reinhold at kainhofer.com (Reinhold Kainhofer)
Date: Sat Jun 23 15:27:29 2007

> 25th of June and December respectively, and one New Year's Day.

I don't think so. The dates matched by the rule have to fulfill all the BY* 
restrictions. In your case, there are not dates that are the first day of the 
year and lie in June or december...

Or to make it more formal according to the evaluation order in the RFC:
For year YY, the recurrence set is generated as:
BYMONTH: Only all days in June or December
BYYEARDAY: only those days in the set that are the first day of the year 
(which are none, so our recurrence set is empty here, already).
BYMONTHDAY: No effect, since the set is already empty.

The BY* rule parts must all be matched by a date/time in the recurrence set, 
but the BY* rule part values (e.g. 6,12 for BYMONTH here) are or'ed together.

Cheers,
Reinhold

- -- 
- ------------------------------------------------------------------
Reinhold Kainhofer, Vienna University of Technology, Austria
email: [email-masked], http://reinhold.kainhofer.com/
 * Financial and Actuarial Mathematics, TU Wien, http://www.fam.tuwien.ac.at/
 * K Desktop Environment, http://www.kde.org, KOrganizer maintainer
 * Chorvereinigung "Jung-Wien", http://www.jung-wien.at/