W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > October to December 2010

Details of dateTime operations

From: Andy Seaborne <andy.seaborne@epimorphics.com>
Date: Fri, 03 Dec 2010 14:12:51 +0000
Message-ID: <4CF8FAE3.9000501@epimorphics.com>
To: SPARQL Working Group <public-rdf-dawg@w3.org>
Easier (hopefully!)

   Return an xsd:integer.
   Return an xsd:decimal (fractional seconds possible).

TIMEZONE is a bit different.  In F&O it returns an xs:dayTimeDuration. 
There are operations like fn:timezone-from-dateTime for each of 
dateTime, date and time. See also casting rules [1].

xs:dayTimeDuration isn't a datatype we currently require support for - 
or xsd:duration - this affects the operations of "<" etc. 
dayTimeDuration is totally ordered [2].

F&O had accessors for xs:duration for years...seconds.

1: Is xsd:dayTimeDuration the appropriate choice for SPARQL?

2: If there is no timezone, what do we return? (we don't have the empty 
sequence, which is what F&O returns.)

3: If it is going to be a duration, should we document that HOURS, 
MINUTES, SECONDS also apply to durations (AKA partial support)?

(Durations drop a bit of information : writing "00:00" or "Z" yield a 
duration of zero and you can't tell which because it's value based.  May 
matter if you care about round tripping.)


[1] http://www.w3.org/TR/xpath-functions/#casting-to-datetimes
[2] http://www.w3.org/TR/xpath-functions/#duration-subtypes
Received on Friday, 3 December 2010 14:13:35 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:01:02 UTC