On 25 January 2005 17:17, John Goerzen wrote:
> On Tue, Jan 25, 2005 at 03:15:38PM -, Simon Marlow wrote:
>> normalizeTimeDiff (and TimeDiff in general) is wrong. I wouldn't
>> recommend using it. There's the TimeExts library in the lang
>> package, which might be useful to you.
>
> I'm cur
On Tue, Jan 25, 2005 at 03:15:38PM -, Simon Marlow wrote:
> normalizeTimeDiff (and TimeDiff in general) is wrong. I wouldn't
> recommend using it. There's the TimeExts library in the lang package,
> which might be useful to you.
I'm curious about that package. It's in my ghc source tree but
On 21 January 2005 21:50, John Goerzen wrote:
> On 2005-01-21, Peter Simons <[EMAIL PROTECTED]> wrote:
>>> 24 * ((fromIntegral $ tdDay td) +
>>> 30 * ((fromIntegral $ tdMonth td) +
>>> 365 * (fromIntegral $ tdYear td)
>>
>> I w
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
Peter Simons <[EMAIL PROTECTED]> writes:
> I was wondering: Does this calculation account for leap
> years? Does it have to?
C itself leaves unspecified the question whether its time calculations
take leap seconds into account. All other systems I know of ignore
leap seconds: POSIX C, Common Lisp
John Goerzen writes:
> timeDiffToSecs :: TimeDiff -> Integer
> timeDiffToSecs td =
> (fromIntegral $ tdSec td) +
> 60 * ((fromIntegral $ tdMin td) +
> 60 * ((fromIntegral $ tdHour td) +
> 24 * ((fromIntegral $ tdDay td) +
> 30 * ((from