the haskell 98 time library is horribly broken, if you are using ghc,
you can deconstruct the time constructor which has an Integer containing
the number of seconds since epoch... otherwise you can use
epoch :: ClockTime
epoch = toClockTime $ CalendarTime { ctYear = 1970, ctMonth = January,
ctDay
THE FUN OF PROGRAMMING
A symposium in honour of
Professor Richard Bird's 60th birthday
Examination Schools, Oxford
24th and 25th March 2003
Professor Richard Bird is well known for his contributions
to functional programming: for his two textbooks, his
"Functional Pearls" column in the Journal of
+-+
CALL FOR PARTICIPATION
First APPSEM-II Workshop
26-28 March 2003
Nottingham, United Kingdom
Registration deadline
I am looking for a simple way to get the current days sincethe epoch. Most
language's standard time library have a get-seconds function that returns
the number of seconds since the epoch, thus the function is for example
in scheme:
(define (days-since-epoch)
((get-seconds) / (* 60 60 24)))
But
I have made a haskell module for HMM (hidden markov models) demonstration.
If somebody is interested, you can find it at
http://www.markusschnell.com/haskell.html
Not meant for production code, there are better implementations. (Hal?)
There's also a module for maintaining demo and development vers