Subject: Recurrence question regarding Februaries

From: "Laird Nelson" <[email-masked]>
Date: Fri, 29 Apr 2005 12:56:34 -0400

I'm writing some calendar advancement logic and want to make sure I
understand the intent of part of RFC 2445 properly.
 
Given an existing arbitrary date like 4/30/2005, and an RFC 2445 recurrence
rule whose intent is "every other day in February", would the next viable
date (i.e. the next date that conforms to the rule--the next date in the
recurrence set) be:
 
  a. February 1, 2006 (e.g. advance the calendar up to the first day of the
month)
  b. February 2, 2006 (e.g. do (1) but then apply the DAILY FREQ rule to get
the second day)
  c. February 28, 2006 (e.g. simply apply the BYMONTH=2 rule part;
equivalent to javaCalendar.add(Calendar.MONTH, 10); it will "align" the day
as appropriate, which, in this case, means setting it to the last day in
February 2006)
  d. None of the above
 
...?
 
My apologies if this is not the proper mailing list on which to ask such
questions.
 
Thank you for your time,
Laird

---

From: Doug Royer <[email-masked]>
Date: Fri, 29 Apr 2005 12:58:32 -0600

Try sending an DTSTART and RRULEs your are talking about.

I do not understand what 4/30/2005 has to do with February.

Laird Nelson wrote:
> Given an existing arbitrary date like 4/30/2005, and an RFC 
> 2445 recurrence rule whose intent is "every other day in February", 
> would the next viable date (i.e. the next date that conforms to the 
> rule--the next date in the recurrence set) be:

>   a. February 1, 2006 (e.g. advance the calendar up to the first day of 
> the month)
>   b. February 2, 2006 (e.g. do (1) but then apply the DAILY FREQ rule to 
> get the second day)
> equivalent to javaCalendar.add(Calendar.MONTH, 10); it will "align" the 
> day as appropriate, which, in this case, means setting it to the last 
> day in February 2006)
>   d. None of the above
>  
> ...?
>  

-- 

Doug Royer                     | http://INET-Consulting.com
-------------------------------|-----------------------------

               We Do Standards - You Need Standards

---

From: "Laird Nelson" <[email-masked]>
Date: Fri, 29 Apr 2005 15:42:20 -0400

> -----Original Message-----
> From: [email-masked] 

OK.  This was a hypothetical example, but I'll give it a shot:

  DTSTART;TZID=US-Eastern:20040201T000000
  RRULE:FREQ=DAILY;INTERVAL=2;BYMONTH=2

(Hopefully I've just encoded a start time of February 1, 2004 at the leading
edge of the first second in the day, and hopefully I've also just expressed
a recurrence rule that says "every other day in February".)

My question is, given those RFC 2445 snippets, and given an arbitrary date
that is NOT in the recurrence set defined by those snippets, what must I do
to such an out-of-range date to bring it into conformance?  So, given, e.g.,
April 30, 2005, what would I have to "do" to it to get it to meet the
conditions of the recurrence rule defined above?  That is, if I add time to
this date such that it "enters" February, 2006, when do I stop adding time
to it?  When it has reached February 1?  When it has reached February 2?

(If I hear you correctly, you're implicitly saying that a recurrence rule is
meaningless without a start date, because, in part, of the very question
that I'm asking (i.e. "what does 'every other day' mean when there's nothing
to 'anchor' it to?").  So saying "every other day in February" is
meaningless without first specifying, e.g., "where the first day of this set
is February 1, 2004".  Is that correct?)

Thanks in advance for your time and consideration,
Laird