justinmimbs/elm-date-extra/1.0.1

NOTE: this package is not compatible with Elm 0.19.1

Date.Facts

Basic date information.

Basics

isLeapYear : Int -> Bool
daysInMonth : Int -> Month -> Int
daysInMonth 2000 Feb -- 29
daysInMonth 2001 Feb -- 28
daysBeforeStartOfMonth : Int -> Month -> Int
daysBeforeStartOfMonth 2000 Mar -- 60
daysBeforeStartOfMonth 2001 Mar -- 59
months : List Month

An ordered list of Date.Month values.

Conversions

monthNumberFromMonth : Month -> Int
monthNumberFromMonth Jan -- 1
monthFromMonthNumber : Int -> Month
monthFromMonthNumber 1 -- Jan
weekdayNumberFromDayOfWeek Mon -- 1
dayOfWeekFromWeekdayNumber 1 -- Mon

Constants

Values for the number of milliseconds per date part. These are equivalent to the constants available in the Time core library, but typed as integers instead of floats.

msPerHour : Int
msPerDay : Int