euler-0.1.0.0

Safe HaskellSafe
LanguageHaskell2010

Euler.Util.Date

Contents

Description

Dates are used in Euler problem 19.

Synopsis

Functions

monthLength :: Int -> Int -> Int Source #

monthLength y m is the number of days in month m of year y.

yearLength :: Int -> Int Source #

The number of days in a year AD.

leap :: Int -> Bool Source #

Whether a year AD is a leap year. Leap years contain an extra day in February.

Properties

The length of a year is equal to the sum of the lengths of its months.

yearLength y == sum (monthLengths y)