[Haskell-cafe] Telling the time

Marc Weber marco-oweber at gmx.de
Thu Jun 21 17:42:48 EDT 2007

On Thu, Jun 21, 2007 at 09:15:12PM +0100, Andrew Coppin wrote:
> Greetings.
> Is there a standard library function anywhere which will parse a string 
> into some kind of date/time representation? And, further, is there some 
> function that will tell me how many seconds elapsed between two such times?
I know about Data.Time.*
and System.Time ( tdSec . diffClockTimes )

For parsing there is the library written by bringert:

I don't know wether it is in the library index on the haskell.org.
If not we should add it. I was'nt able to find it there.
> (I see there's a giant pile of modules to do with dates and times, but I 
> can't make much sense out of them - and in at least one place, the 

The trouble is that time processing can be complicated if you want to
pay attention to leap seconds/ years etc. leap seconds can't be known in
advance etc.
> documentation on the Haskell website doesn't actually match what's 
> installed on my computer!)
That's why I'm reading the source all the time ;)
>  2007-05-26 11:23:16 PM|Begin processing...

Marc Weber

More information about the Haskell-Cafe mailing list