Data.Time.Calendar.WeekDate.Compat

time-compat-1.9.6.1: Compatibility package for time

Safe Haskell | Trustworthy
Language | Haskell2010

Data.Time.Calendar.WeekDate.Compat

Contents

- ISO 8601 Week Date format

Synopsis

- type Year = Integer
- type WeekOfYear = Int
- data DayOfWeek
  - = Monday
  - | Tuesday
  - | Wednesday
  - | Thursday
  - | Friday
  - | Saturday
  - | Sunday
- dayOfWeek :: Day -> DayOfWeek
- data FirstWeekType
  - = FirstWholeWeek
  - | FirstMostWeek
- toWeekCalendar :: FirstWeekType -> DayOfWeek -> Day -> (Year, WeekOfYear, DayOfWeek)
- fromWeekCalendar :: FirstWeekType -> DayOfWeek -> Year -> WeekOfYear -> DayOfWeek -> Day
- fromWeekCalendarValid :: FirstWeekType -> DayOfWeek -> Year -> WeekOfYear -> DayOfWeek -> Maybe Day
- toWeekDate :: Day -> (Year, WeekOfYear, Int)
- fromWeekDate :: Year -> WeekOfYear -> Int -> Day
- pattern YearWeekDay :: Year -> WeekOfYear -> DayOfWeek -> Day
- fromWeekDateValid :: Year -> WeekOfYear -> Int -> Maybe Day
- showWeekDate :: Day -> String

# Documentation

type Year = Integer #

type WeekOfYear = Int #

data DayOfWeek #

Constructors

Monday |
Tuesday |
Wednesday |
Thursday |
Friday |
Saturday |
Sunday |

#### Instances

Instances details

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

dayOfWeek :: Day -> DayOfWeek #

data FirstWeekType #

Constructors

FirstWholeWeek |
FirstMostWeek |

#### Instances

Instances details

Eq FirstWeekType |
Instance details Defined in Data.Time.Calendar.WeekDate Methods (==) :: FirstWeekType -> FirstWeekType -> Bool (/=) :: FirstWeekType -> FirstWeekType -> Bool

toWeekCalendar :: FirstWeekType -> DayOfWeek -> Day -> (Year, WeekOfYear, DayOfWeek) #

fromWeekCalendar :: FirstWeekType -> DayOfWeek -> Year -> WeekOfYear -> DayOfWeek -> Day #

fromWeekCalendarValid :: FirstWeekType -> DayOfWeek -> Year -> WeekOfYear -> DayOfWeek -> Maybe Day #

# ISO 8601 Week Date format

toWeekDate :: Day -> (Year, WeekOfYear, Int) #

fromWeekDate :: Year -> WeekOfYear -> Int -> Day #

pattern YearWeekDay :: Year -> WeekOfYear -> DayOfWeek -> Day #

fromWeekDateValid :: Year -> WeekOfYear -> Int -> Maybe Day #

showWeekDate :: Day -> String #