Data.Time.Calendar.Quarter.Compat

time-compat-1.9.6.1: Compatibility package for time

Safe Haskell | Trustworthy
Language | Haskell2010

Data.Time.Calendar.Quarter.Compat

Contents

- time-compat extras

Synopsis

- data QuarterOfYear
  - = Q1
  - | Q2
  - | Q3
  - | Q4
- 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 #

Constructors

Q1 |
Q2 |
Q3 |
Q4 |

#### Instances

Instances details

Data QuarterOfYear |
Instance details Defined in Data.Time.Calendar.Quarter Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> QuarterOfYear -> c QuarterOfYear gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c QuarterOfYear toConstr :: QuarterOfYear -> Constr dataTypeOf :: QuarterOfYear -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c QuarterOfYear) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c QuarterOfYear) gmapT :: (forall b. Data b => b -> b) -> QuarterOfYear -> QuarterOfYear gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> QuarterOfYear -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> QuarterOfYear -> r gmapQ :: (forall d. Data d => d -> u) -> QuarterOfYear -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> QuarterOfYear -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> QuarterOfYear -> m QuarterOfYear gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> QuarterOfYear -> m QuarterOfYear gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> QuarterOfYear -> m QuarterOfYear
Bounded QuarterOfYear |
Instance details Defined in Data.Time.Calendar.Quarter Methods minBound :: QuarterOfYear maxBound :: QuarterOfYear
Enum QuarterOfYear |
Instance details Defined in Data.Time.Calendar.Quarter Methods succ :: QuarterOfYear -> QuarterOfYear pred :: QuarterOfYear -> QuarterOfYear toEnum :: Int -> QuarterOfYear fromEnum :: QuarterOfYear -> Int enumFrom :: QuarterOfYear -> [QuarterOfYear] enumFromThen :: QuarterOfYear -> QuarterOfYear -> [QuarterOfYear] enumFromTo :: QuarterOfYear -> QuarterOfYear -> [QuarterOfYear] enumFromThenTo :: QuarterOfYear -> QuarterOfYear -> QuarterOfYear -> [QuarterOfYear]
Ix QuarterOfYear |
Instance details Defined in Data.Time.Calendar.Quarter Methods range :: (QuarterOfYear, QuarterOfYear) -> [QuarterOfYear] index :: (QuarterOfYear, QuarterOfYear) -> QuarterOfYear -> Int unsafeIndex :: (QuarterOfYear, QuarterOfYear) -> QuarterOfYear -> Int inRange :: (QuarterOfYear, QuarterOfYear) -> QuarterOfYear -> Bool rangeSize :: (QuarterOfYear, QuarterOfYear) -> Int unsafeRangeSize :: (QuarterOfYear, QuarterOfYear) -> Int
Read QuarterOfYear |
Instance details Defined in Data.Time.Calendar.Quarter Methods readsPrec :: Int -> ReadS QuarterOfYear readList :: ReadS [QuarterOfYear] readPrec :: ReadPrec QuarterOfYear readListPrec :: ReadPrec [QuarterOfYear]
Show QuarterOfYear |
Instance details Defined in Data.Time.Calendar.Quarter Methods showsPrec :: Int -> QuarterOfYear -> ShowS show :: QuarterOfYear -> String showList :: [QuarterOfYear] -> ShowS
NFData QuarterOfYear |
Instance details Defined in Data.Time.Calendar.Quarter Methods rnf :: QuarterOfYear -> ()
Eq QuarterOfYear |
Instance details Defined in Data.Time.Calendar.Quarter Methods (==) :: QuarterOfYear -> QuarterOfYear -> Bool (/=) :: QuarterOfYear -> QuarterOfYear -> Bool
Ord QuarterOfYear |
Instance details Defined in Data.Time.Calendar.Quarter Methods compare :: QuarterOfYear -> QuarterOfYear -> Ordering (<) :: QuarterOfYear -> QuarterOfYear -> Bool (<=) :: QuarterOfYear -> QuarterOfYear -> Bool (>) :: QuarterOfYear -> QuarterOfYear -> Bool (>=) :: QuarterOfYear -> QuarterOfYear -> Bool max :: QuarterOfYear -> QuarterOfYear -> QuarterOfYear min :: QuarterOfYear -> QuarterOfYear -> QuarterOfYear
Hashable QuarterOfYear # |
Instance details Defined in Data.Time.Orphans Methods hashWithSalt :: Int -> QuarterOfYear -> Int # hash :: QuarterOfYear -> Int #

addQuarters :: Integer -> Quarter -> Quarter #

diffQuarters :: Quarter -> Quarter -> Integer #

newtype Quarter #

Constructors

MkQuarter Integer |

#### Instances

Instances details

Data Quarter |
Instance details Defined in Data.Time.Calendar.Quarter Methods 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 |
Instance details Defined in Data.Time.Calendar.Quarter Methods succ :: Quarter -> Quarter pred :: Quarter -> Quarter toEnum :: Int -> Quarter fromEnum :: Quarter -> Int enumFrom :: Quarter -> [Quarter] enumFromThen :: Quarter -> Quarter -> [Quarter] enumFromTo :: Quarter -> Quarter -> [Quarter] enumFromThenTo :: Quarter -> Quarter -> Quarter -> [Quarter]
Ix Quarter |
Instance details Defined in Data.Time.Calendar.Quarter Methods range :: (Quarter, Quarter) -> [Quarter] index :: (Quarter, Quarter) -> Quarter -> Int unsafeIndex :: (Quarter, Quarter) -> Quarter -> Int inRange :: (Quarter, Quarter) -> Quarter -> Bool rangeSize :: (Quarter, Quarter) -> Int unsafeRangeSize :: (Quarter, Quarter) -> Int
Read Quarter |
Instance details Defined in Data.Time.Calendar.Quarter Methods readsPrec :: Int -> ReadS Quarter readList :: ReadS [Quarter] readPrec :: ReadPrec Quarter readListPrec :: ReadPrec [Quarter]
Show Quarter |
Instance details Defined in Data.Time.Calendar.Quarter Methods showsPrec :: Int -> Quarter -> ShowS show :: Quarter -> String showList :: [Quarter] -> ShowS
NFData Quarter |
Instance details Defined in Data.Time.Calendar.Quarter Methods rnf :: Quarter -> ()
Eq Quarter |
Instance details Defined in Data.Time.Calendar.Quarter Methods (==) :: Quarter -> Quarter -> Bool (/=) :: Quarter -> Quarter -> Bool
Ord Quarter |
Instance details Defined in Data.Time.Calendar.Quarter Methods compare :: Quarter -> Quarter -> Ordering (<) :: Quarter -> Quarter -> Bool (<=) :: Quarter -> Quarter -> Bool (>) :: Quarter -> Quarter -> Bool (>=) :: Quarter -> Quarter -> Bool max :: Quarter -> Quarter -> Quarter min :: Quarter -> Quarter -> Quarter
Hashable Quarter # |
Instance details Defined in Data.Time.Orphans Methods hashWithSalt :: Int -> Quarter -> Int # hash :: Quarter -> Int #
DayPeriod Quarter |
Instance details Defined in Data.Time.Calendar.Quarter Methods periodFirstDay :: Quarter -> Day periodLastDay :: Quarter -> Day dayPeriod :: Day -> Quarter

pattern YearQuarter :: Year -> QuarterOfYear -> Quarter #

monthOfYearQuarter :: MonthOfYear -> QuarterOfYear #

monthQuarter :: Month -> Quarter #

dayQuarter :: Day -> Quarter #

# time-compat extras

fromYearQuarter :: Year -> QuarterOfYear -> Quarter #

Part of `YearQuarter` pattern

toYearQuarter :: Quarter -> (Year, QuarterOfYear) #

Part of `YearQuarter` pattern