Subject: Re: Changes to RECUR

From: [email-masked]
Date: Wed, 25 Apr 2001 16:19:31 -0400

Jonathan suggested:
>It's not clear to me that that's really necessary.  A self-contradictory
>rule isn't *ambiguous* -- it's clear that it means "no recurrence at all,
>except for the DTSTART." 

The attempt to make a very flexible and powerful recurrence grammar 
created cases that are sometimes workable and sometimes not.  This is part 
of an ongoing attempt by implementors to codify what cases are allowed and 
which are not.  By codifying allowed and disallowed cases and the proper 
actions we reduce the margin of error that various CUAs may have to deal 
with.  My quick head calcs show that we can generate LOTS of combinations 
that are just illogical and that just makes my coding job that much 
harder. 

Eric is attempting to simplify and codify the boundaries for the grammar 
parts and its not just an exercise in keeping the revision editor busy.

>or the somewhat less obvious
>DTSTART;TZID=America/New_York:20010329T0230
>DURATION:T20M
>RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=1SU

Ugh, my split mucked me up again, sorry...

That case is not bad either.  Its a case where the 1st instance of the 
repeat set is NOT the same as the following instances.  That is, the 1st 
instance is 29-Mar-2001 @ 02:30:00 and lasts for 20 minutes.  The next 
(and all subsequent instances are on 01-Apr at the same time and for the 
same duration (ie: 01-Apr-2001, 02-Apr-2002, etc). 

>(This is the reason I dropped bysetpos from CPL...)

That means you will have a ver hard time supporting Outlook users.  They 
use BYSETPOS to convey simple stuff like "The 4th Thrusday every month"...

Bruce
PS: Thats duration should have been "PT20M" I think...
===========================================================================
Bruce Kahn                                INet: [email-masked]
Iris Associates                          Phone: 978.392.5335
Westford, MA, USA 01886                    FAX: and nothing but the FAX...
Standard disclaimers apply, even where prohibited by law...

---

From: Jonathan Lennox <[email-masked]>
Date: Wed, 25 Apr 2001 17:07:38 -0400 (EDT)

> parts and its not just an exercise in keeping the revision editor busy.

Well, it depends on how your code works.

If you have to have separate code for each of the 2^N combinations of rules,
eliminating combinations makes things simpler.  If you have independent code
for each of the N orthogonal rule restrictions (as I believe is possible --
I did it for the CPL subset), forbidding combinations makes things more
*complicated*.

And forbidding combinations doesn't make the grammar (if by that you mean
syntactic-level rules) any simpler.

> same duration (ie: 01-Apr-2001, 02-Apr-2002, etc). 

Yes, there's one initial occurence on March 29.

After that, though, I contend that there are no subsequent recurences,
because in America/New_York (under current DST rules) 2:30 - 2:50 AM doesn't
occur on the first Sunday in April.  (Clocks jump from 1:59:59 AM EST to
3:00:00 AM EDT.)

If you disagree, what time and duration do you think the subsequent
recurrences should have?

> use BYSETPOS to convey simple stuff like "The 4th Thrusday every month"...

They use BYSETPOS rather than BYDAY=4TH?  That's odd.  Are you sure?

> PS: Thats duration should have been "PT20M" I think...

Yes, you're right.  I assume the "P" is a ISO compatibility thing?  It seems
gratuitous otherwise.

-- 
Jonathan Lennox
[email-masked]

---

From: Alan Davies <[email-masked]>
Date: Thu, 26 Apr 2001 11:26:18 -0400

>They use BYSETPOS rather than BYDAY=4TH?  That's odd.  Are you sure?

They do use BYSETPOS, but leaving it in the spec doesn't really help
Outlook compatibility; This is the RRULE Outlook 2000 just generated
for me, when I specified "The Fourth Thursday of every 1 Month(s),
repeating forever" in it's 'Appointment Recurrence' Dialog:

RRULE:FREQ=MONTHLY;INTERVAL=1;BYDAY=TH;BYSETPOS=4;WKST=SU

The BYDAY=TH;BYSETPOS=4; should surely be BYDAY=4TH; as you said
(so that we take the fourth Thursday of _every_ month, not just
the fourth occurrence from the set generated by the rest of the rule).
This rule clearly generates just one recurrence.

There doesn't seem to be a way in the Outlook UI to generate an
RRULE that would use BYSETPOS correctly.

Hmmmm. Does anyone actually use BYSETPOS as defined by RFC2445?

--Alan

---

From: Alan Davies <[email-masked]>
Date: Thu, 26 Apr 2001 13:12:52 -0400

It's been pointed out to me that I'd misinterpreted the meaning
of BYSETPOS- the wording in 2445 doesn't seem to specify which
'set' BYSETPOS refers to, but the example given implies it must be
the period of FREQ * INTERVAL, rather than the entire set generated
by the rest of the rule:

RRULE:FREQ=MONTHLY;BYDAY=MO,TU,WE,TH,FR;BYSETPOS=-1

This example shows that BYSETPOS does indeed have some
value, as there would be no way to represent this other
than with RDATEs.

So, my penultimate paragraph should have read:

Outlook only uses BYSETPOS in cases where an ordinal value
could have been used instead (e.g. BYDAY=4TH, etc.).

--Alan