Comment 12 for bug 969928

Revision history for this message
Tom Hennigan (tomhennigan) wrote :

Agreed, the microseconds bug is fairly obviously wrong, e.g. `relativedelta(seconds=1, microseconds=1) == relativedelta(seconds=1)`.

Being unable to compare relativedelta objects easily also annoyed me, and so I've also implemented a solution (didn't Google before, doh!). I implemented the rich comparison operators and added __cmp__ based on them. My solution currently is not taking leapseconds into account, that needs to be changed.

https://github.com/tomhennigan/python-dateutil/compare/feature;comparable-relativedelta