Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Year quarters.
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
- type DayOfQuarter = Int
- pattern QuarterDay :: Quarter -> DayOfQuarter -> Day
Documentation
data QuarterOfYear Source #
Quarters of each year. Each quarter corresponds to three months.
Instances
An absolute count of year quarters.
Number is equal to (year * 4) + (quarterOfYear - 1)
.
Instances
Enum Quarter Source # | |
Eq Quarter Source # | |
Data Quarter Source # | |
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 # | |
Ord Quarter Source # | |
Read Quarter Source # | Read as |
Show Quarter Source # | Show as |
Ix Quarter Source # | |
Defined in Data.Time.Calendar.Quarter | |
NFData Quarter Source # | |
Defined in Data.Time.Calendar.Quarter | |
DayPeriod Quarter Source # | |
pattern YearQuarter :: Year -> QuarterOfYear -> Quarter Source #
Bidirectional abstract constructor.
monthOfYearQuarter :: MonthOfYear -> QuarterOfYear Source #
The QuarterOfYear
this MonthOfYear
is in.
type DayOfQuarter = Int Source #
Day of quarter, in range 1 to 92.
pattern QuarterDay :: Quarter -> DayOfQuarter -> Day Source #
Bidirectional abstract constructor. Invalid days of quarter will be clipped to the correct range.
Since: 1.12.1