Subject: [caldav] All Day Events

From: Michael Rasmussen <[email-masked]>
Date: Wed, 9 Mar 2011 03:21:45 +0100

Hi list,

Is there any normative way of handling all-day events on its way into
the specification?

The current situation seems to be split between two idioms. An all-day
event of 2011-03-03 is expressed in either of these two ways:
1)
DTSTART;VALUE=DATE:20110303
DTEND;VALUE=DATE:20110303 
2)
DTSTART;VALUE=DATE:20110303
DTEND;VALUE=DATE:20110304 

Personally I tend to vote for option 1) since option 2) clashes with
the possibility of specifying a two day event.

-- 
Hilsen/Regards
Michael Rasmussen

Get my public GnuPG keys:
michael <at> rasmussen <dot> cc
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xD3C9A00E
mir <at> datanom <dot> net
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE501F51C
mir <at> miras <dot> org
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE3E80917
--------------------------------------------------------------
Write clearly - don't be too clever.
            - The Elements of Programming Style (Kernighan & Plaugher)

---

From: Helge Hess <[email-masked]>
Date: Tue, 8 Mar 2011 18:29:58 -0800

> DTEND;VALUE=DATE:20110303 

Not sure what you are talking about but the above is invalid iCalendar:

  http://www.apps.ietf.org/rfc/rfc2445.html#sec-4.8.2.2

  "Within the "VEVENT" calendar component, this property defines
   the date and time by which the event ends. The value MUST be
   later in time than the value of the "DTSTART" property."

DTEND is exclusive, not inclusive. Your option two is right for a one day event.

Another option is using duration, eg:
  DTSTART;VALUE=DATE:20110303
  DURATION:P1D

hh

---

From: Cyrus Daboo <[email-masked]>
Date: Tue, 08 Mar 2011 21:31:34 -0500

Hi Michael,

> the possibility of specifying a two day event.

The behavior specified by iCalendar is that the DTSTART is "inclusive" and 
the DTEND is "exclusive". What that means is an event ends at the very 
instant before the DTEND value. So strictly speaking your #1 example is 
wrong as it specifies an event of zero duration (it ends at the very 
instant that it starts). #2 is valid. There is a third option which is to 
just specify the DTSTART value as iCalendar states that the default 
duration in that case is one day. The fourth option is to use DTSTART and 
DURATION which is arguably the least confusing representation.

-- 
Cyrus Daboo