Subject: RE: Recurrence implementation question

From: "NITSCH,FRANK (HP-Germany,ex1)" <[email-masked]>
Date: Wed, 30 May 2001 10:33:26 +0200

> > Issue 2:
> > It's necessary to calculate all the recurrence dates that 
> occur between the
> > event's start date and the specified time frame's start 
> date even though
> > they are not needed.
> 
> This is only true if a recurrence has a COUNT parameter, and it's easy
> enough to do a one-time translation of COUNT into a "virtual" UNTIL.

But this would change the definition as set by the user. Imagine you - as a
user - enter a recurring schedule using the COUNT parameter. The CS would
"translate" it into a UNTIL statement. Someday wou want to edit the schedule
and it follows a different rule!
Let's say you have the following rule from the RFC2445 (end of chapter
4.3.10)

	FREQ=DAILY;COUNT=10;INTERVAL=2

If you'd convert the COUNT parameter to UNTIL and then the user changes the
INTERVAL from 2 to 3 then he won't get 10 occurrences as specified
initially!
Always keep in mind that "helper techniques" within a CS implementation must
be transparent to the user. What I could think of is to have translated
recurrence rules within the CS. As soon as a user modifies a schedule the CS
would need to updated the translated helper schedules.
This is pretty much the same concept that I proposed. At least what
"pre-calculation" concerns. But this way one could save lots of database
entries and smartly skip recurrence rules that don't affect the timeframe a
user is requesting. ;-)
So what about pre-translating CS internal schedule objects which need to be
maintained by the CS?

--
Frank Nitsch
mailto:[email-masked]

---

From: Jonathan Lennox <[email-masked]>
Date: Wed, 30 May 2001 12:45:57 -0400 (EDT)

> and it follows a different rule!

Well, yes, clearly -- that's why I said "virtual" UNTIL.  The server
calculates the date of the last recurrence (by count) whenever a new or
changed recurrence rule is sent to it.  It caches this value locally
alongside the rule, for its calculation purposes, but it still presents the
actual COUNT value -- and not the UNTIL -- whenever the rule is queried or
edited.

The point of this is just to speed calculations -- if the period of time
you're interested in is earlier than a rule's start, or later than its
computed until, you can quickly conclude that you don't need to worry about
that rule for now.

-- 
Jonathan Lennox
[email-masked]