W3C home > Mailing lists > Public > public-poiwg@w3.org > May 2011

Re: POI Core Strawman: ISSUE-26: How do we represent times?

From: Leigh L Klotz Jr <leigh.klotz@xerox.com>
Date: Fri, 13 May 2011 10:07:08 -0700
Message-ID: <4DCD653C.9020006@xerox.com>
To: Thomas Wrobel <darkflame@gmail.com>
CC: public-poiwg@w3.org
Adding and subtracting dates results in durations, not dates.  There are 
dateTimeDuration and dayDateDuration types.

The lexical representation is specified in ISO8601 and uses the letter 
"P" inside the string, so P1M is one month.
There are libraries to parse and serialize these in JavaScript, Java, 
C#, etc. and represent them as native objects.

Leigh.

On 05/12/2011 01:55 PM, Thomas Wrobel wrote:
>
> Query; doesn't disallowing 0000 as a year present discontinuities when
> adding and subtracting years?
>
> Not sure this will crop up much in POIs, if at all, but I am curious
> as to the apparent complications this adds to working out dates over
> large scales into the past.
>
> On 12 May 2011 18:24, Leigh L Klotz Jr <leigh.klotz@xerox.com> wrote:
> > I'd recommend using the lexical format definitions here:
> > http://www.w3.org/TR/xmlschema-2/#isoformats
> >
> > It's profiled from ISO8601 and so there is no fee required to read the
> > document.
> > and it is a W3C Recommendation, not a NOTE as the 1997 note below, 
> and are
> > in wide use.
> >
> > See section D.2 "Truncated and Reduced" formats for the description 
> of time.
> >
> > Leigh.
> >
> >
> >
> > On 05/12/2011 02:29 AM, Thomas Wrobel wrote:
> >
> > http://www.w3.org/TR/NOTE-datetime allows progressive detail down to
> > the fraction of a second.
> >
> > It doesn't seem to however cover specifying a time but not a date,
> > which I think is usefull when it comes to simple repetition. If we
> > want to allow time specification without a date then we do need a
> > co-existing alternative.
> > --
> > Also, I strongly feel we should rename this element.
> > Time is highly generic and can mean many things ("creation time?
> > opening time? time of the data being put online? etc"). The name
> > should be clear.
> > Assuming we have two elements to determine a time range (both 
> optional),
> > Id suggest having it "ExistanceStart" or just "Start" to clarifying we
> > are specifying the range the POIs exists from or over.  A similar
> > "End" field would be used to mark the end of the range.
> > (a missing start or end would just mean the range of the POI in time
> > goes to infinity in that direction....ie, has existed forever or will
> > exist forever, or both. Both specified without a date could indicate a
> > repeating range  etc)
> >
> >
> > ~~~~~~
> > Reviews of anything, by anyone;
> > www.rateoholic.co.uk
> > Please try out my new site and give feedback :)
> >
> > On 12 May 2011 07:33, Leigh L. Klotz, Jr. <Leigh.Klotz@xerox.com> 
> wrote:
> >> Matt Womer wrote
> >>>It was said that time should be optional, I had tried to indicate 
> that it
> >>> is by saying "can have one or more",
> >>>which was meant to imply "has zero or more". I've changed the text 
> to say
> >>> "MAY have one or more".
> >> ...
> >>>As for representing the time itself, I've pulled in info from XML 
> Schema
> >>> Datatypes, but that only gives us
> >>>some primitives to play with, not how we're going to put them 
> together.
> >>
> >> One option for the xsd:dateTime and xsd:date type is to allow 
> either type
> >> in
> >> cases where you have date and optional time.
> >> They're lexically distinct, so this works for XSD structures or for 
> RNC
> >> structures describing XML, and for JSON, etc.
> >>
> >> 2011-05-11T12:24:45-0000
> >> and
> >> 2011-05-11
> >>
> >> So the latter indicates a date without a time (precision).
> >>
> >> Similarly, if you want to allow dateTime or time (and default the 
> date via
> >> context) it's also lexically distinct.
> >>
> >> Leigh.
> >>
> >>
> >>
> >>
> >
>
Received on Friday, 13 May 2011 17:07:33 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 13 May 2011 17:07:34 GMT