- From: Steve Harris <steve.harris@garlik.com>
- Date: Fri, 3 Dec 2010 14:41:10 +0000
- To: Andy Seaborne <andy.seaborne@epimorphics.com>
- Cc: SPARQL Working Group <public-rdf-dawg@w3.org>
On 2010-12-03, at 14:12, Andy Seaborne wrote:
> Easier (hopefully!)
>
> YEAR, MONTH, DAY, HOURS, MINUTES
> Return an xsd:integer.
> SECONDS
> Return an xsd:decimal (fractional seconds possible).
Sounds good.
What about a NOW()? Returning an xsd:dateTime for the current time, in the Z timezone. e.g.
CONSTRUCT {
<new> dc:date ?now ;
dc:title "new object" .
}
WHERE {
BIND(NOW() AS ?now) # will that work?
}
Very useful for batch processes and the like.
No strong feelings about TIMEZONE, we do everything in zulu time, so no practical experience.
- Steve
> 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.)
>
> Andy
>
> [1] http://www.w3.org/TR/xpath-functions/#casting-to-datetimes
> [2] http://www.w3.org/TR/xpath-functions/#duration-subtypes
>
--
Steve Harris, CTO, Garlik Limited
1-3 Halford Road, Richmond, TW10 6AW, UK
+44 20 8439 8203 http://www.garlik.com/
Registered in England and Wales 535 7233 VAT # 849 0517 11
Registered office: Thames House, Portsmouth Road, Esher, Surrey, KT10 9AD
Received on Friday, 3 December 2010 14:41:46 UTC