Michael Rasmussen | 9 Mar 2011 03:21
X-Face
Face
Favicon

All Day Events

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.
(Continue reading)

Helge Hess | 9 Mar 2011 03:29
Favicon

Re: All Day Events

On Mar 8, 2011, at 6:21 PM, Michael Rasmussen wrote:
> 1)
> DTSTART;VALUE=DATE:20110303
> 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
Cyrus Daboo | 9 Mar 2011 03:31
Favicon

Re: All Day Events

Hi Michael,

--On March 9, 2011 3:21:45 AM +0100 Michael Rasmussen <mir <at> datanom.net> 
wrote:

> 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.

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

Gmane