Data.Time.Calendar.MonthDay

time-1.12.2: A time library

Safe Haskell | Safe
Language | Haskell2010

Data.Time.Calendar.MonthDay

Synopsis

- type MonthOfYear = Int
- pattern January :: MonthOfYear
- pattern February :: MonthOfYear
- pattern March :: MonthOfYear
- pattern April :: MonthOfYear
- pattern May :: MonthOfYear
- pattern June :: MonthOfYear
- pattern July :: MonthOfYear
- pattern August :: MonthOfYear
- pattern September :: MonthOfYear
- pattern October :: MonthOfYear
- pattern November :: MonthOfYear
- pattern December :: MonthOfYear
- type DayOfMonth = Int
- type DayOfYear = Int
- monthAndDayToDayOfYear :: Bool -> MonthOfYear -> DayOfMonth -> DayOfYear
- monthAndDayToDayOfYearValid :: Bool -> MonthOfYear -> DayOfMonth -> Maybe DayOfYear
- dayOfYearToMonthAndDay :: Bool -> DayOfYear -> (MonthOfYear, DayOfMonth)
- monthLength :: Bool -> MonthOfYear -> DayOfMonth

# Documentation

type MonthOfYear = Int Source #

Month of year, in range 1 (January) to 12 (December).

pattern January :: MonthOfYear Source #

pattern February :: MonthOfYear Source #

pattern March :: MonthOfYear Source #

pattern April :: MonthOfYear Source #

pattern May :: MonthOfYear Source #

pattern June :: MonthOfYear Source #

pattern July :: MonthOfYear Source #

pattern August :: MonthOfYear Source #

pattern September :: MonthOfYear Source #

pattern October :: MonthOfYear Source #

pattern November :: MonthOfYear Source #

pattern December :: MonthOfYear Source #

The twelve `MonthOfYear` patterns form a `COMPLETE` set.

type DayOfMonth = Int Source #

Day of month, in range 1 to 31.

type DayOfYear = Int Source #

Day of year, in range 1 (January 1st) to 366. December 31st is 365 in a common year, 366 in a leap year.

monthAndDayToDayOfYear :: Bool -> MonthOfYear -> DayOfMonth -> DayOfYear Source #

Convert month and day in the Gregorian or Julian calendars to day of year. First arg is leap year flag.

monthAndDayToDayOfYearValid :: Bool -> MonthOfYear -> DayOfMonth -> Maybe DayOfYear Source #

Convert month and day in the Gregorian or Julian calendars to day of year. First arg is leap year flag.

dayOfYearToMonthAndDay :: Bool -> DayOfYear -> (MonthOfYear, DayOfMonth) Source #

Convert day of year in the Gregorian or Julian calendars to month and day. First arg is leap year flag.

monthLength :: Bool -> MonthOfYear -> DayOfMonth Source #

The length of a given month in the Gregorian or Julian calendars. First arg is leap year flag.