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
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: time-1.12.1