Dave Rolsky wrote:
This means that if you do subtract_datetime on two objects you end up
with this situation:
$dur = $dt2 - $dt1
$dt1 + $dur != $dt2
$dt2 - $dur != $dt1
So, assuming America/Chicago: (2003-12-01) - (2003-09-01) will return a
duration representing 2 months, 29 days and 23 hours?
If so, I'd prefer it returned a duration object representing n seconds ...
THEN I'd like to see another 'local difference' function that worked
down from years ..
2003 - 2003 = 0 years
12 - 09 = 3 months
01 - 01 = 0 days
(extending .. (2004-01-23) - (2003-09-01) becomes:
2004 - 2003 = 1 year \ auto normalises / 0 years
01 - 09 = -8 months >-- to get rid of --< 4 months
23 - 01 = 22 days / negative values \ 22 days
)
Then again, I wonder if durations shouldn't be removed altogether and
put into separate packages that allowed people to choose their math
assumptions.
Cheers!
Rick Measham