Subject: Re: Recap: Does 1 day == 24 hours?

From: [email-masked]
Date: Mon, 23 Apr 2001 18:19:25 -0400

Alan wrote:
> (As a side note: it's not clear in RFC2445 whether durations
> such as PT70S, PT60M etc. are allowed - i.e. with second/minute
> components greater than 59. I can't see any text to disallow
> them though.)

From RFC 2445, Section 4.3.6:

4.3.6   Duration

   Value Name: DURATION

   Purpose: This value type is used to identify properties that contain
   a duration of time.
[Snip]

     dur-value  = (["+"] / "-") "P" (dur-date / dur-time / dur-week)

     dur-date   = dur-day [dur-time]
     dur-time   = "T" (dur-hour / dur-minute / dur-second)
     dur-week   = 1*DIGIT "W"
     dur-hour   = 1*DIGIT "H" [dur-minute]
     dur-minute = 1*DIGIT "M" [dur-second]
     dur-second = 1*DIGIT "S"
     dur-day    = 1*DIGIT "D"

As noted, there is nothing precluding the use of DURATION:PT90M over 
DURATION:PT1H30M.  Both are equally valid and legal.  You could possibly 
even encode it as a whole lot of seconds if you wanted to.

You may be thinking of the restrictions that were put on the Recurrence 
Rule values.  Check out Section 4.3.10 for those restrictions (ie: 
BYHOUR=1,9,23) but they do not apply to this context.

Bruce
===========================================================================
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: [email-masked]
Date: Thu, 26 Apr 2001 11:54:23 -0400

eric wrote on 04/25/2001 03:54:28 PM:

> > Duration MUST be of VALUE=DATE if DTSTART is of VALUE=DATE.  This does 

> > preclude a DURATION:1DT8H case but its an acceptable limitation to me.
> 
> It's not really a limitation, since if your times are in the date scale
> then the end time should be disregarded -- you couldn't do anything with
> the 8H anyway. 

Sure you can.  Well, I didnt scan the RFCs for the exact text (too many 
scans frying my brain) but if I have a DTSTART;VALUE=DATE:20010427 then 
there is an implicit start time of 00:00:00 local time so a duration of 8H 
is fine.  It would begin at midnight local time and end at 8AM local 
time...

> And, in this case, 1D, really means "until the end of the day specified 
in
> DTSTART" -- essentiall my option (2).

If you want that behaviour then reread 2445 where it talks about 
DTSTART;VALUE=DATE and no DTEND where it says that its implied 23:59:59 
local time...    No need for a DURATION:P1D.

> ( BTW, RFC2445 does not permit a VALUE parameter for DURATION, so I will
> suppose that VALUE=DATE implies that the DURATION value has no H, M or S 
) 

Thats because its encoded in the value of sorts in the dur-value data 
type.  It can contain both.

Bruce