Haskell LanguageDate and Time

Syntax

  • addDays :: Integer -> Day -> Day

  • diffDays :: Day -> Day -> Integer

  • fromGregorian :: Integer -> Int -> Int -> Day

     convert from proleptic Gregorian calendar. First argument is year, second month number (1-12), third day (1-31). Invalid values will be clipped to the correct range, month first, then day.
    
  • getCurrentTime :: IO UTCTime

Remarks

The Data.Time module from time package provides support for retrieving & manipulating date & time values: