[Bug 23435] It's not possible to add two 'duration's without knowing an end point

https://www.w3.org/Bugs/Public/show_bug.cgi?id=23435

--- Comment #1 from C. M. Sperberg-McQueen <cmsmcq@blackmesatech.com> ---
It is a fact about the Gregorian calendar that arithmetic on durations
expressed as numbers of years, months, days, hours, minutes, and seconds is not
necessarily precise.  Life is hard.

It does not seem to me to be the task of XSD to repair this fact, so the
inability to perform arbitrary arithmetic operations on durations without
running into quandaries like the ones described does not seem to me to be a
flaw in the XSD spec. 

There are two simple workarounds: work only with positive durations and
addition, or work with the two subtypes of duration for which arithmetic is
easy and deterministic (namely those consisting solely of year and month or
solely of day, hour, minute, and second -- these are deterministic for
arbitrary arithmetic, as long as it is agreed that leap seconds do not
participate in the date or duration arithmetic).

In allowing negative durations, XSD is already extending ISO 8601 (following
here, as far as I can tell, the lead of SQL and of Java); allowing different
signs on different parts of a duration would be an ingenious solution to the
problem you have encountered, but it would make XSD incompatible with XQuery
and with other users of ISO 8601 durations.  That does not seem to me to be a
good idea.

So I would recommend that the responsible W3C working group decline to make any
change in XSD here, and respectfully suggest that they close the bug report
with a resolution of INVALID (since XSD does not in fact define operations for
its simple types) or WONTFIX.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Thursday, 3 October 2013 23:01:22 UTC