On Tue, 6 Sep 2005, renard wrote:

The results should be obviously "correct" and not throw an unexpected curve.
When I find the difference between 2 dates I expect to obtain the same dates
when I add/subract the difference. If I don't then it raises a red flag on the correctness of adding/
subtracting date duration...no matter what the documentation says.

I understand the difficulty when adding/subtracting months
    July 4 - 1 month   expect  June 4
    June 4 + 1 month  expect July 4


    July 31 - 1 month   expect  June 30
    June 30 + 1 month expect July 30

However if I take the difference between 2 dates I definitely
expect to obtain the original end dates. I don't want to dig through the
documentation to find why it doesn't.

I'm not quite following this paragraph. In the second example (July -> June -> July) are you saying those results are what you'd expect or not? If they're not what you'd expect, what would you expect instead?

Perhaps a DateTime::SimpleDate would be what an occasional user like me would need

The problem is (I think) that different people will have different expectations of what's intuitive here, because if you think about it much you realize that _almost nothing_ is intuitive when it comes to date(time) math.


-dave

/*===================================================
VegGuide.Org                        www.BookIRead.com
Your guide to all that's veg.       My book blog
===================================================*/

Reply via email to