thyme-0.3.5.5: A faster time library

Safe Haskell | None
Language | Haskell2010

Data.Thyme.Calendar.MonthDay

Description

Julian or Gregorian.

Synopsis

- type Month = Int
- type DayOfMonth = Int
- data MonthDay = MonthDay {
  - mdMonth :: !Month
  - mdDay :: !DayOfMonth
  }
- monthDay :: Bool -> Iso' DayOfYear MonthDay
- monthDayValid :: Bool -> MonthDay -> Maybe DayOfYear
- monthLength :: Bool -> Month -> Days
- _mdMonth :: Lens' MonthDay Month
- _mdDay :: Lens' MonthDay DayOfMonth

# Documentation

type Month = Int Source #

type DayOfMonth = Int Source #

data MonthDay Source #

Constructors

MonthDay |

Fields

- mdMonth :: !Month
- mdDay :: !DayOfMonth

#### Instances

Instances details

Bounded MonthDay Source # |
Instance details Defined in Data.Thyme.Calendar.Internal Methods minBound :: MonthDay maxBound :: MonthDay
Eq MonthDay Source # |
Instance details Defined in Data.Thyme.Calendar.Internal Methods (==) :: MonthDay -> MonthDay -> Bool (/=) :: MonthDay -> MonthDay -> Bool
Data MonthDay Source # |

Instance details

Defined in Data.Thyme.Calendar.Internal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> MonthDay -> c MonthDay

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c MonthDay

toConstr :: MonthDay -> Constr

dataTypeOf :: MonthDay -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c MonthDay)

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c MonthDay)

gmapT :: (forall b. Data b => b -> b) -> MonthDay -> MonthDay

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> MonthDay -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> MonthDay -> r

gmapQ :: (forall d. Data d => d -> u) -> MonthDay -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> MonthDay -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> MonthDay -> m MonthDay

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> MonthDay -> m MonthDay

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> MonthDay -> m MonthDay

Ord MonthDay Source # |
Instance details Defined in Data.Thyme.Calendar.Internal Methods compare :: MonthDay -> MonthDay -> Ordering (<) :: MonthDay -> MonthDay -> Bool (<=) :: MonthDay -> MonthDay -> Bool (>) :: MonthDay -> MonthDay -> Bool (>=) :: MonthDay -> MonthDay -> Bool max :: MonthDay -> MonthDay -> MonthDay min :: MonthDay -> MonthDay -> MonthDay
Show MonthDay Source # |
Instance details Defined in Data.Thyme.Calendar.Internal Methods showsPrec :: Int -> MonthDay -> ShowS show :: MonthDay -> String showList :: [MonthDay] -> ShowS
Generic MonthDay Source # |
Instance details Defined in Data.Thyme.Calendar.Internal Associated Types type Rep MonthDay :: Type -> Type Methods from :: MonthDay -> Rep MonthDay x to :: Rep MonthDay x -> MonthDay
Arbitrary MonthDay Source # |
Instance details Defined in Data.Thyme.Calendar.Internal Methods arbitrary :: Gen MonthDay Source # shrink :: MonthDay -> [MonthDay] Source #
CoArbitrary MonthDay Source # |
Instance details Defined in Data.Thyme.Calendar.Internal Methods coarbitrary :: MonthDay -> Gen b -> Gen b Source #
Random MonthDay Source # |

Instance details

Defined in Data.Thyme.Calendar.Internal

Methods

randomR :: RandomGen g => (MonthDay, MonthDay) -> g -> (MonthDay, g) Source #

random :: RandomGen g => g -> (MonthDay, g) Source #

randomRs :: RandomGen g => (MonthDay, MonthDay) -> g -> [MonthDay] Source #

randoms :: RandomGen g => g -> [MonthDay] Source #

randomRIO :: (MonthDay, MonthDay) -> IO MonthDay Source #

randomIO :: IO MonthDay Source #

Unbox MonthDay Source # |
Instance details Defined in Data.Thyme.Calendar.Internal
NFData MonthDay Source # |
Instance details Defined in Data.Thyme.Calendar.Internal Methods rnf :: MonthDay -> ()
ParseTime MonthDay Source # |
Instance details Defined in Data.Thyme.Format Methods buildTime :: TimeParse -> MonthDay Source #
FormatTime MonthDay Source # |
Instance details Defined in Data.Thyme.Format Methods showsTime :: TimeLocale -> MonthDay -> (Char -> ShowS) -> Char -> ShowS Source #
Vector Vector MonthDay Source # |

Instance details

Defined in Data.Thyme.Calendar.Internal

Methods

basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) MonthDay -> m (Vector MonthDay) Source #

basicUnsafeThaw :: PrimMonad m => Vector MonthDay -> m (Mutable Vector (PrimState m) MonthDay) Source #

basicLength :: Vector MonthDay -> Int Source #

basicUnsafeSlice :: Int -> Int -> Vector MonthDay -> Vector MonthDay Source #

basicUnsafeIndexM :: Monad m => Vector MonthDay -> Int -> m MonthDay Source #

basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) MonthDay -> Vector MonthDay -> m () Source #

elemseq :: Vector MonthDay -> MonthDay -> b -> b Source #

MVector MVector MonthDay Source # |

Instance details

Defined in Data.Thyme.Calendar.Internal

Methods

basicLength :: MVector s MonthDay -> Int Source #

basicUnsafeSlice :: Int -> Int -> MVector s MonthDay -> MVector s MonthDay Source #

basicOverlaps :: MVector s MonthDay -> MVector s MonthDay -> Bool Source #

basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) MonthDay) Source #

basicInitialize :: PrimMonad m => MVector (PrimState m) MonthDay -> m () Source #

basicUnsafeReplicate :: PrimMonad m => Int -> MonthDay -> m (MVector (PrimState m) MonthDay) Source #

basicUnsafeRead :: PrimMonad m => MVector (PrimState m) MonthDay -> Int -> m MonthDay Source #

basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) MonthDay -> Int -> MonthDay -> m () Source #

basicClear :: PrimMonad m => MVector (PrimState m) MonthDay -> m () Source #

basicSet :: PrimMonad m => MVector (PrimState m) MonthDay -> MonthDay -> m () Source #

basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) MonthDay -> MVector (PrimState m) MonthDay -> m () Source #

basicUnsafeMove :: PrimMonad m => MVector (PrimState m) MonthDay -> MVector (PrimState m) MonthDay -> m () Source #

basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) MonthDay -> Int -> m (MVector (PrimState m) MonthDay) Source #

type Rep MonthDay Source # |

Instance details

Defined in Data.Thyme.Calendar.Internal

type Rep MonthDay = D1 ('MetaData "MonthDay" "Data.Thyme.Calendar.Internal" "thyme-0.3.5.5-8yk8awDjzEHHYSq2xJCwO3" 'False) (C1 ('MetaCons "MonthDay" 'PrefixI 'True) (S1 ('MetaSel ('Just "mdMonth") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Month) :*: S1 ('MetaSel ('Just "mdDay") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 DayOfMonth)))

newtype Vector MonthDay Source # |
Instance details Defined in Data.Thyme.Calendar.Internal newtype Vector MonthDay = V_MonthDay (Vector Int)
newtype MVector s MonthDay Source # |
Instance details Defined in Data.Thyme.Calendar.Internal newtype MVector s MonthDay = MV_MonthDay (MVector s Int)

monthDay :: Bool -> Iso' DayOfYear MonthDay Source #

Convert between day of year in the Gregorian or Julian calendars, and month and day of month. First arg is leap year flag.

monthDayValid :: Bool -> MonthDay -> Maybe DayOfYear Source #

monthLength :: Bool -> Month -> Days Source #

_mdMonth :: Lens' MonthDay Month Source #

_mdDay :: Lens' MonthDay DayOfMonth Source #