On Tue, 11 Nov 2003, Max Maischein wrote: > I saw in the CHANGES file that you added some other delta_* methods, but > didn't find them in the documentation, so I don't know about these, and > was too lazy to delve into the source for this :-)
These are for DateTime objects. I'm now regretting the fact that both classes have delta_* methods. Sigh ... > I wrote a test file that shows some ugly bugs when dealing with my naive > comparision, most notably that ($dt-$dt)->is_zero() is false. I don't > know why you implemented is_zero() that way, so I can't propose any good > change. My approach would be to make is_zero() not only check the sign > but also check whether all values are zero. Yeah, the is_* bits for durations are all screwed up. I'm considering removing them, because I'm not sure we can fix them and still do interesting thing with durations. > DateTime::Duration problems on the mailing list, but I saw that you > considered removing the comparision operators completely from > DateTime::Duration - I think this would be bad, but I only ended up DateTime::Duration has never had comparison methods or overloading, so this would be difficult to remove ;) > looking at DateTime::Duration, as I could not find an easy way to look > at two DateTime objects and find out which one was later, as comparision > for those also isn't implemented (or, once again, I'm too stupid to read > the docs properly). Now I'm really confused. DateTime.pm objects have _always_ had a compare method, plus they overload comparison operators. -dave /*======================= House Absolute Consulting www.houseabsolute.com =======================*/