RE: ISSUE-126 (Revisit Datatypes): A new proposal for the real <-> float <-> double conundrum

> 
> I don't see that moments in time, segments of time, and 
> repeating intervals make up a sensible datatype.  That's my 
> particular problem with the idea.  

Well, one can certainly conceive of a generalization of these types that is
a three-dimensional space whose axes are the start instant (perhaps
unknown), the duration (perhaps zero), and the interval between repeats
(perhaps infinite). Alternatively, and perhaps more conveniently, you can
think of it as a seven-dimensional space containing year, month, day, hour,
minute, second, and timezone-offset, allowing components at either end to be
omitted, where the absence of a high-order component indicates a repeating
interval and the absence of a low-order component indicates a time span.

E.g., how does one define order?  Is 14:00:00 less than or equal to 1997?

You could define an ordering (if you wanted to) by filling in the gaps,
treating 14:00:00 as say 0000-01-01T14:00:00 and 1997 as
1997-01-01T00:00:00. Or you could say that the new primitive type is
unordered, only the subtypes are ordered, as we do with the two duration
subtypes.
> 
> I'm curious how the simplification would be effected for QT.

Difficult to do retrospectively, but with such a type, instead of XSLT
defining three functions format-date, format-time, and format-dateTime, it
could have defined a single function which would work perfectly well on all
eight types, as well as on other logically-consistent subtypes like
gHourMinute.

Michael Kay
http://www.saxonica.com/

Received on Sunday, 6 July 2008 09:14:16 UTC