On 2005-01-21, Peter Simons <[EMAIL PROTECTED]> wrote: > > 24 * ((fromIntegral $ tdDay td) + > > 30 * ((fromIntegral $ tdMonth td) + > > 365 * (fromIntegral $ tdYear td))))) > > I was wondering: Does this calculation account for leap > years? Does it have to?
I also wondered about all months being 30 days. But this exact algorithm is used in fptools' normalizeTimeDiff, and it seems to work out correctly, so I guess the timeDiff functions assume that every month has 30 days and every year has 365. When you make that assumption, leap seconds suddenly stop mattering :-) -- John _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
