[Haskell-beginners] get date (SOLVED)
luca_ciciriello at hotmail.com
Thu Jun 24 02:52:04 EDT 2010
Yes I use getCurrentTime. But I found I a stupid error in my code.
Now all works fine.
Thanks anyway for your answer.
On Jun 23, 2010, at 8:13 PM, Felipe Lessa wrote:
> On Wed, Jun 23, 2010 at 08:03:16PM +0200, Luca Ciciriello wrote:
>> How can I get the current system date-time in Haskell?
>> I've used the library Time, but on MacOS X 10.6.4 the year is always 0.
> Do you mean, you used getCurrentTime from the time package?
> What does the following line do?
> (toGregorian . utctDay) `fmap` getCurrentTime
> On my system,
> GHCi, version 6.10.4: http://www.haskell.org/ghc/ :? for help
> Loading package ghc-prim ... linking ... done.
> Loading package integer ... linking ... done.
> Loading package base ... linking ... done.
> Prelude> :m Data.Time
> Prelude Data.Time> (toGregorian . utctDay) `fmap` getCurrentTime
> Loading package old-locale-184.108.40.206 ... linking ... done.
> Loading package time-1.1.4 ... linking ... done.
More information about the Beginners