Skip to content

Instantly share code, notes, and snippets.

View Changaco's full-sized avatar

Charly C. Changaco

View GitHub Profile
import Data.Time.Clock
import Data.Time.Calendar
currentDate :: IO (Integer, Int, Int)
currentDate = fmap (toGregorian . utctDay) getCurrentTime
daysOfMonth :: Integer -> Int -> [Day]
daysOfMonth year month = map (fromGregorian year month) [1..gregorianMonthLength year month]
main = do