Correct semantics of Quantity and Date/Time types

Description

Currently there are some anomalies in the Quantity package. The current package
does not properly distinguish between date/time/datetime and other kinds of
quantities. Date/times are not 'amounts', so the + and - operators should not be
defined.

On an 'amount', the + and - operators are defined as in normal maths,
i.e. stuff + more stuff = stuff and stuff - some stuff = less stuff.
No matter what you do, you only have one type of stuff - like a lump of clay
that you pull apart and stick together.

Date/times on the other hand (but not durations) are 'offsets' from an origin,
and + and - don't make sense (you can't add two dates, two times, or two
date/times; you can subtract them, but you don't end up with the same kind,
you get a duration).

The general nature of the change needed is therefore to properly distinguish
'normal' quantities from Date, Time and Date/Time. This will simplify the model
and software implementations based on it, while losing no semantics.

Activity

Fixed

Details

Assignee

Reporter

Priority

Created February 1, 2007 at 12:00 AM
Updated February 26, 2007 at 12:00 AM
Resolved February 26, 2007 at 12:00 AM