On 2010.8.22 5:42 AM, Dave Rolsky wrote:
> Division just can't work. What is 1/25 of a month?
>
> The individual units of a duration cannot be simply tranformed into
> other units, and the object doesn't support non-integer values, nor does
> DateTime.pm support non-integer values for datetime math.
Division works for every unit but months and years. Perhaps it could be
implemented for durations that are only days/hours/minutes and throw an
exception if it contains a month or year?
That's effectively what multiplication is doing in reverse, except it
deliberately avoids the ambiguity by not trying to upgrade days to months.
--
"Clutter and overload are not an attribute of information,
they are failures of design"
-- Edward Tufte