[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: list of items (recur-id is not CAP)





Arnaud Quillaud wrote:

If you sent:

   QUERY:SELECT * FROM VEVENT
     WHERE DTSTART >='20000701T000000Z'
      AND DTSTART <='20000730T235959Z'

You would get back VEVENTs with a DTSTART property value between
those two dates. If a recurring VEVENT existed and was daily starting
from DTSTART:19990101T000000Z, it would not match the query, even
when one of its instances (RECURRENCE-ID) did match. The same is



Why ? Each of the instances of a recurring event has a DTSTART as far as I know. Why would we take into account only the first instance ?

The object that would be returned with a RECURRENCE-ID as shown in the
CAP QUERY example would return:

VEVENT:

	DTSTART:19990101T000000Z
	RECURRENCE-ID: ...something that matched....

So the DTSTART still does not match, however the RECURRENCE-ID
that is calculated from EXPAND:TRUE does match.

When expanding an existing recurring object, you do not
modify the DTSTART value, you add a RECURRENCE-ID property
to be the effective start time of the Nth instance(s) that
match.


true if the VEVENT had a RDATE:20000702T000000Z, as you did not
query for RDATE, it would not match as RDATE is not DTSTART.

The DTSTART value only matches the RECURRENCE-ID on the first instance
of a repeating object. If you query for DTSTART values, that is what you will get.
If you query for RECURRENCE-ID values, then you get any VEVENT that
has an effective instance start time that matches that value (somehow stored
or computed).



That is true only if the RECURRENCE-ID of the instance matches the DTSTART of this instance.


The first instance always matches the DTSTART value, else you could never compute
the second.


And 2445:

  The "DTSTART" property for a "VEVENT" specifies the inclusive start
  of the event. For recurring events, it also specifies the very first
  instance in the recurrence set.

If this instance was originally:

RECURRENCE-ID:20000729T000000Z
DTSTART:20000729T000000Z

but the DTSTART is moved to 20000802T000000Z

we end up with

RECURRENCE-ID:20000729T000000Z
DTSTART:20000802T000000Z

The 1st instance can not be less than the DTSTART value as 2445 mandates
that DTSTART is the first instance.

If the "Query by Date-Time range" in the CAP example is done using the RECURRENCE-ID, this particular instance will be returned when it actually doesn't belong to that range.


You example was not valid.


All objects with an RRULE or RDATE property values have virtual
RECURRENCE-ID's even when an RECURRENCE-ID was
not explicitly sent or stored in the object.

What do you think you would get back if EXPAND:FALSE were in
the CAP example?



My understanding is that we would return any event object that has at least one instance that matches the filter (whether it is RECURRENCE-ID or DTSTART). So for recurring event, we would return the MASTER event (the one containing RRULE/RDATE) and all its exceptions if there are any.

If you have EXPAND:TRUE, and query for RECURRENCE-ID, then ALL matching
VEVENTs that contain any RRULE or RDATE would also contain a calculated
RECURRENCE-ID. Without the RECURRENCE-ID in a returned object that
also contains an RRULE or RDATE, then that object returned is specifying a set of
UNexpaned instances. So no, you would not get back the master object that contained
unexpanded instances.


If you have EXPAND:FALSE and query for RECURRENCE-ID, you will get
back one object without any RECURRENCE-ID, which if expanded would match.

If you have EXPAND:TRUE and query for DTSTART, you will only get
objects that have a DTSTART value in that range.

If you have EXPAND:FALSE and query for DTSTART, you will only get
objects that have a DTSTART value in that range.

If we take a daily VEVENT starting  from DTSTART:19990101T000000Z and recurring forever, it would be a match even though the DTSTART of this master event is not in the range.
So we would get back:

BEGIN:VEVENT
DTSTART:19990101T000000Z
RRULE:FREQ=DAILY
...


Again, DTSTART is not modified, only RECURRENCE-ID is added to the
returned object(s) in EXPAND:TRUE.

--

Doug Royer                     |   http://INET-Consulting.com
-------------------------------|-----------------------------
Doug@xxxxxxxxx                 | Office: (208)520-4044
http://Royer.com/People/Doug   |    Fax: (866)594-8574
                              |   Cell: (208)520-4044

We Do Standards - You Need Standards

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature