Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
An absolute count of common calendar months.
Synopsis
- newtype Month = MkMonth Integer
- addMonths :: Integer -> Month -> Month
- diffMonths :: Month -> Month -> Integer
- pattern YearMonth :: Year -> MonthOfYear -> Month
- fromYearMonthValid :: Year -> MonthOfYear -> Maybe Month
- pattern MonthDay :: Month -> DayOfMonth -> Day
- fromMonthDayValid :: Month -> DayOfMonth -> Maybe Day
Documentation
An absolute count of common calendar months.
Number is equal to (year * 12) + (monthOfYear - 1)
.
Instances
NFData Month Source # | |
Defined in Data.Time.Calendar.Month | |
Data Month Source # | |
Defined in Data.Time.Calendar.Month gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Month -> c Month # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Month # dataTypeOf :: Month -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Month) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Month) # gmapT :: (forall b. Data b => b -> b) -> Month -> Month # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Month -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Month -> r # gmapQ :: (forall d. Data d => d -> u) -> Month -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Month -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Month -> m Month # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Month -> m Month # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Month -> m Month # | |
Enum Month Source # | |
Defined in Data.Time.Calendar.Month | |
Ix Month Source # | |
Read Month Source # | Read as |
Show Month Source # | Show as |
Eq Month Source # | |
Ord Month Source # | |
DayPeriod Month Source # | |
FormatTime Month Source # | |
Defined in Data.Time.Format.Format.Instances formatCharacter :: Bool -> Char -> Maybe (FormatOptions -> Month -> String) Source # | |
ParseTime Month Source # | |
Defined in Data.Time.Format.Parse.Instances substituteTimeSpecifier :: Proxy Month -> TimeLocale -> Char -> Maybe String Source # parseTimeSpecifier :: Proxy Month -> TimeLocale -> Maybe ParseNumericPadding -> Char -> ReadP String Source # buildTime :: TimeLocale -> [(Char, String)] -> Maybe Month Source # |
pattern YearMonth :: Year -> MonthOfYear -> Month Source #
Bidirectional abstract constructor. Invalid months of year will be clipped to the correct range.
fromYearMonthValid :: Year -> MonthOfYear -> Maybe Month Source #
pattern MonthDay :: Month -> DayOfMonth -> Day Source #
Bidirectional abstract constructor. Invalid days of month will be clipped to the correct range.
fromMonthDayValid :: Month -> DayOfMonth -> Maybe Day Source #