[ create a new paste ] login | about

Link: http://codepad.org/wJaS9LKO    [ raw code | output | fork ]

Haskell, pasted on Apr 7:
1
2
3
4
5
6
7
8
import System.Locale (defaultTimeLocale)
import System.Time (formatCalendarTime, toUTCTime, getClockTime, ClockTime)

main = do now <- getClockTime
          putStrLn $ getMonthString now

getMonthString :: ClockTime -> String
getMonthString = formatCalendarTime defaultTimeLocale "%B" . toUTCTime


Output:
1
April


Create a new paste based on this one


Comments: