
21 Jan
2005
21 Jan
'05
4:49 p.m.
On 2005-01-21, Peter Simons
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