thyme-0.3.5.5: A faster time library

Safe Haskell | None
Language | Haskell2010

Data.Thyme.Calendar.OrdinalDate

Contents

- Orphan instances

Description

ISO 8601 Ordinal Date format

Synopsis

- type Year = Int
- isLeapYear :: Year -> Bool
- type DayOfYear = Int
- data OrdinalDate = OrdinalDate {
  - odYear :: !Year
  - odDay :: !DayOfYear
  }
- ordinalDate :: Iso' Day OrdinalDate
- ordinalDateValid :: OrdinalDate -> Maybe Day
- _odYear :: Lens' OrdinalDate Year
- _odDay :: Lens' OrdinalDate DayOfYear

# Documentation

type Year = Int Source #

isLeapYear :: Year -> Bool Source #

Gregorian leap year?

type DayOfYear = Int Source #

data OrdinalDate Source #

Constructors

OrdinalDate |

Fields

- odYear :: !Year
- odDay :: !DayOfYear

Instances

Bounded OrdinalDate Source # |
Instance details Defined in Data.Thyme.Calendar.OrdinalDate Methods minBound :: OrdinalDate Source # maxBound :: OrdinalDate Source #
Eq OrdinalDate Source # |
Instance details Defined in Data.Thyme.Calendar.Internal Methods (==) :: OrdinalDate -> OrdinalDate -> Bool Source # (/=) :: OrdinalDate -> OrdinalDate -> Bool Source #
Data OrdinalDate 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) -> OrdinalDate -> c OrdinalDate Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c OrdinalDate Source #

toConstr :: OrdinalDate -> Constr Source #

dataTypeOf :: OrdinalDate -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c OrdinalDate) Source #

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

gmapT :: (forall b. Data b => b -> b) -> OrdinalDate -> OrdinalDate Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> OrdinalDate -> r Source #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> OrdinalDate -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> OrdinalDate -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> OrdinalDate -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> OrdinalDate -> m OrdinalDate Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> OrdinalDate -> m OrdinalDate Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> OrdinalDate -> m OrdinalDate Source #

Ord OrdinalDate Source # |

Instance details

Defined in Data.Thyme.Calendar.Internal

Methods

compare :: OrdinalDate -> OrdinalDate -> Ordering Source #

(<) :: OrdinalDate -> OrdinalDate -> Bool Source #

(<=) :: OrdinalDate -> OrdinalDate -> Bool Source #

(>) :: OrdinalDate -> OrdinalDate -> Bool Source #

(>=) :: OrdinalDate -> OrdinalDate -> Bool Source #

max :: OrdinalDate -> OrdinalDate -> OrdinalDate Source #

min :: OrdinalDate -> OrdinalDate -> OrdinalDate Source #

Show OrdinalDate Source # |
Instance details Defined in Data.Thyme.Calendar.Internal Methods showsPrec :: Int -> OrdinalDate -> ShowS Source # show :: OrdinalDate -> String Source # showList :: [OrdinalDate] -> ShowS Source #
Generic OrdinalDate Source # |
Instance details Defined in Data.Thyme.Calendar.Internal Associated Types type Rep OrdinalDate :: Type -> Type Source # Methods from :: OrdinalDate -> Rep OrdinalDate x Source # to :: Rep OrdinalDate x -> OrdinalDate Source #
Arbitrary OrdinalDate Source # |
Instance details Defined in Data.Thyme.Calendar.OrdinalDate Methods arbitrary :: Gen OrdinalDate Source # shrink :: OrdinalDate -> [OrdinalDate] Source #
CoArbitrary OrdinalDate Source # |
Instance details Defined in Data.Thyme.Calendar.OrdinalDate Methods coarbitrary :: OrdinalDate -> Gen b -> Gen b Source #
NFData OrdinalDate Source # |
Instance details Defined in Data.Thyme.Calendar.Internal Methods rnf :: OrdinalDate -> () Source #
Random OrdinalDate Source # |

Instance details

Defined in Data.Thyme.Calendar.OrdinalDate

Methods

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

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

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

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

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

randomIO :: IO OrdinalDate Source #

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

Instance details

Defined in Data.Thyme.Calendar.Internal

Methods

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

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

basicLength :: Vector OrdinalDate -> Int Source #

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

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

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

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

MVector MVector OrdinalDate Source # |

Instance details

Defined in Data.Thyme.Calendar.Internal

Methods

basicLength :: MVector s OrdinalDate -> Int Source #

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

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

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

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

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

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

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

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

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

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

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

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

type Rep OrdinalDate Source # |
Instance details Defined in Data.Thyme.Calendar.Internal type Rep OrdinalDate = D1 (MetaData "OrdinalDate" "Data.Thyme.Calendar.Internal" "thyme-0.3.5.5-Fg1pPOWWkee1p55oP1P4W4" False) (C1 (MetaCons "OrdinalDate" PrefixI True) (S1 (MetaSel (Just "odYear") SourceUnpack SourceStrict DecidedStrict) (Rec0 Year) :*: S1 (MetaSel (Just "odDay") SourceUnpack SourceStrict DecidedStrict) (Rec0 DayOfYear)))
newtype Vector OrdinalDate Source # |
Instance details Defined in Data.Thyme.Calendar.Internal newtype Vector OrdinalDate = V_OrdinalDate (Vector Int)
newtype MVector s OrdinalDate Source # |
Instance details Defined in Data.Thyme.Calendar.Internal newtype MVector s OrdinalDate = MV_OrdinalDate (MVector s Int)

ordinalDate :: Iso' Day OrdinalDate Source #

ordinalDateValid :: OrdinalDate -> Maybe Day Source #

_odYear :: Lens' OrdinalDate Year Source #

_odDay :: Lens' OrdinalDate DayOfYear Source #

# Orphan instances

Bounded OrdinalDate Source # |
Instance details Methods minBound :: OrdinalDate Source # maxBound :: OrdinalDate Source #
Arbitrary OrdinalDate Source # |
Instance details Methods arbitrary :: Gen OrdinalDate Source # shrink :: OrdinalDate -> [OrdinalDate] Source #
CoArbitrary OrdinalDate Source # |
Instance details Methods coarbitrary :: OrdinalDate -> Gen b -> Gen b Source #
Random OrdinalDate Source # |

Instance details

Methods

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

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

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

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

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

randomIO :: IO OrdinalDate Source #