Haskell Language Date and Time

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

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:



Got any Haskell Language Question?