HaskellWiki

Haskell | Wiki community | Recent changes
Random page | Special pages

 

Not logged in
Log in | Help

Getting the current date

Categories: How to


In order to get the date:

import Data.Time.Clock
import Data.Time.Calendar
 
date :: IO (Integer,Int,Int) -- :: (year,month,day)
date = getCurrentTime >>= return . toGregorian . utctDay

Retrieved from "http://www.haskell.org/haskellwiki/Getting_the_current_date"

This page has been accessed 685 times. This page was last modified 17:54, 11 July 2007. Recent content is available under a simple permissive license.