On Mon, 10 Nov 2003, Jonathan Swartz wrote: > > Well, that still doesn't say which is bigger. For example, 1 month is > > smaller than 30 days if your base date is Feb 1, but not if it's December > > 1. It might be useful if you know that both durations were originally > > derived from a single base datetime, but otherwise it's not terribly > > useful. > > True, it isn't useful if you want to compare absolutely arbitrary durations > and get a reliable answer. But in my case, I was dealing with durations > defined in hours and minutes, and guaranteed to be less than a day, so the > comparison would pretty much work anchored at any date. * I'd guess that > many DateTime applications have constraints like that which would allow > worry-free comparisons. > > Maybe it's better to offer the comparison operators (by anchoring at present > time) and give ample warnings in the documentation about the cases where it > won't work reliably.
Sounds like a reasonable addition to the FAQ. > * - yes, I'm sure you date experts will ravenously point out certain Julian > epochs where an hour was only 58 minutes or something. give me a little > slack, ok? :) I think you meant "ravingly" rather than "ravenously". But I _will_ point out that there _are_ leapseconds, which means that _some_ minutes are longer than others, and by extension some hours are longer than hours. -dave /*======================= House Absolute Consulting www.houseabsolute.com =======================*/