Safe Haskell | Trustworthy |
---|---|
Language | Haskell2010 |
Synopsis
- data QuarterOfYear
- addQuarters :: Integer -> Quarter -> Quarter
- diffQuarters :: Quarter -> Quarter -> Integer
- newtype Quarter = MkQuarter Integer
- pattern YearQuarter :: Year -> QuarterOfYear -> Quarter
- monthOfYearQuarter :: MonthOfYear -> QuarterOfYear
- monthQuarter :: Month -> Quarter
- dayQuarter :: Day -> Quarter
- fromYearQuarter :: Year -> QuarterOfYear -> Quarter
- toYearQuarter :: Quarter -> (Year, QuarterOfYear)
Documentation
data QuarterOfYear #
Quarters of each year. Each quarter corresponds to three months.
Instances
addQuarters :: Integer -> Quarter -> Quarter #
diffQuarters :: Quarter -> Quarter -> Integer #
An absolute count of year quarters.
Number is equal to (year * 4) + (quarterOfYear - 1)
.
Instances
Data Quarter | |
Defined in Data.Time.Calendar.Quarter gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Quarter -> c Quarter # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Quarter # toConstr :: Quarter -> Constr # dataTypeOf :: Quarter -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Quarter) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Quarter) # gmapT :: (forall b. Data b => b -> b) -> Quarter -> Quarter # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Quarter -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Quarter -> r # gmapQ :: (forall d. Data d => d -> u) -> Quarter -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Quarter -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Quarter -> m Quarter # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Quarter -> m Quarter # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Quarter -> m Quarter # | |
Enum Quarter | |
Ix Quarter | |
Defined in Data.Time.Calendar.Quarter | |
Read Quarter | Read as |
Show Quarter | Show as |
NFData Quarter | |
Defined in Data.Time.Calendar.Quarter | |
Eq Quarter | |
Ord Quarter | |
Hashable Quarter Source # | |
Defined in Data.Time.Orphans | |
DayPeriod Quarter | |
Defined in Data.Time.Calendar.Quarter |
pattern YearQuarter :: Year -> QuarterOfYear -> Quarter #
Bidirectional abstract constructor.
monthOfYearQuarter :: MonthOfYear -> QuarterOfYear #
The QuarterOfYear
this MonthOfYear
is in.
time-compat extras
fromYearQuarter :: Year -> QuarterOfYear -> Quarter Source #
Part of YearQuarter
pattern
toYearQuarter :: Quarter -> (Year, QuarterOfYear) Source #
Part of YearQuarter
pattern