W3C home > Mailing lists > Public > public-qt-comments@w3.org > April 2009

[Bug 4856] [FO11] arithmetic on durations

From: <bugzilla@wiggum.w3.org>
Date: Tue, 28 Apr 2009 11:17:13 +0000
To: public-qt-comments@w3.org
Message-Id: <E1LylJJ-0005va-Uf@wiggum.w3.org>

--- Comment #13 from Michael Kay <mike@saxonica.com>  2009-04-28 11:17:13 ---

(a) Define (duration * number) and (duration div number) to work on all
durations, not only the two subtypes as at present. The semantics are defined
by splitting the duration into a yMD and a dTD, then applying the current
operator, then recombining the results.

The results may be a little idiosyncratic in the case where the number is not
an integer, but it's perfectly well-defined and there are many cases where it's

(b) Define (D +|- duration) for all durations (not only the two subtypes) where
D is a date or dateTime. The semantics are defined by splitting duration into a
yMD and a dTD and then taking (D +|- yMD +|- dTD). This is well-defined over
all durations.

(c) Define (T +|- duration) where T is an xs:time for all durations (not only
for dTD). The number of years/months in the duration is ignored, just as the
number of days is currently ignored.

(d) Define (duration +|- duration) for all durations, but returning a dynamic
error for certain combinations of operands. Specifically, the two durations are
decomposed into yMD and dTD; the two components are independently added and
subtracted; if the two partial-results have the same sign, they are combined
together to form the result; if they have opposite sign, the result is a
dynamic error.

(Note: there are a number of ways we could implement this proposal, depending
how much we want to change the op: functions.)

Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Tuesday, 28 April 2009 11:17:22 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:57:27 UTC