W3C home > Mailing lists > Public > public-rif-wg@w3.org > February 2009

Re: Action 695 argument

From: Jos de Bruijn <debruijn@inf.unibz.it>
Date: Tue, 10 Feb 2009 19:03:32 +0100
Message-ID: <4991C174.10605@inf.unibz.it>
To: Gary Hallmark <gary.hallmark@oracle.com>
CC: Dave Reynolds <der@hplb.hpl.hp.com>, Changhai Ke <cke@ilog.fr>, RIF WG <public-rif-wg@w3.org>

Gary Hallmark wrote:
> Jos pointed out most of my "missing" builtins are actually there, in the
> casting builtins.  I think we are missing maybe 2 builtins:
>   * How can I change a datetime from one timezone to another?

There is indeed no built-in for that specific purpose.  However, one
could extract all the components from a dateTime and construct a new
one, e.g., using the string casting function.

>   * How do I reference the current datetime (e.g. fn:current-dateTime)?

In a declarative formalism like BLD there cannot be such
context-dependent things like "current" datetime, because then the
formalism would not be declarative anymore.
One would need to define the semantics relative to a context given by
the user.  This would make things kind of ugly.

I could imagine, though, that in PRD this would not really be a problem.
 PRD does not need to restrict itself to the built-ins in BLD.

Best, Jos

> Gary Hallmark wrote:
>> Dave Reynolds wrote:
>>> So it sounds like you might need to propose that RIF adds xsd:date
>>> and xsd:time (with and without timezone).
>> according to DTB, RIF already has xsd:date and xsd:time.
>> why does xml schema add xsd:datetimestamp, but not add xsd:datestamp
>> and xsd:timestamp that makes the timezone mandatory for dates and
>> times as well as datetimes?
>> It looks like DTB is incomplete in its support for date, time,
>> datetime, and duration builtins.  For example,
>>    * how can I construct a date from a string like "2009-02-09"?    *
>> How can I construct a datetime from a date and a time?    * How can I
>> split a datetime into a date and a time?    * How can I add a (int)
>> number of hours to a datetime?
>>    * How can I change a datetime from one timezone to another?
>>    * How do I reference the current datetime (e.g. fn:current-dateTime
>>      <#func-current-dateTime>)

Jos de Bruijn            debruijn@inf.unibz.it
+390471016224         http://www.debruijn.net/
No one who cannot rejoice in the discovery of
his own mistakes deserves to be called a
  - Donald Foster

Received on Tuesday, 10 February 2009 18:03:36 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:47:54 UTC