Data.Time.Calendar.MonthDay.Compat

time-compat-1.9.6.1: Compatibility package for time

Safe Haskell | Trustworthy
Language | Haskell2010

Data.Time.Calendar.MonthDay.Compat

Synopsis

- type MonthOfYear = Int
- 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 #

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

type DayOfMonth = Int #

Day of month, in range 1 to 31.

type DayOfYear = Int #

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 #

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 #

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) #

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

monthLength :: Bool -> MonthOfYear -> DayOfMonth #

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