Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Classes for constructing datetime values and extracting time components, Internal
Synopsis
- class HasDate t d | t -> d where
- date :: t -> d
- dateToTime :: d -> t
- class HasYear t where
- class HasMonth t where
- class HasDay t where
- class HasHour t where
- class HasMinute t where
- class HasSecond t where
- class HasNanoSecond t where
- nanoSecond :: t -> NanoSeconds
- class Calendar dt where
- type CalendarDate dt :: Type
- type CalendarTime dt :: Type
- mkDate :: Int64 -> Int64 -> Int64 -> CalendarDate dt
- mkTime :: Int64 -> Int64 -> Int64 -> CalendarTime dt
- mkDatetime :: Int64 -> Int64 -> Int64 -> Int64 -> Int64 -> Int64 -> dt
Documentation
class HasDate t d | t -> d where Source #
Utility for interpretTimeAtWithStart
.
Extract the day component from a date.
class HasNanoSecond t where Source #
Extract the nanosecond component from a datetime or time.
nanoSecond :: t -> NanoSeconds Source #
Instances
HasNanoSecond DiffTime Source # | |
Defined in Polysemy.Time.Calendar nanoSecond :: DiffTime -> NanoSeconds Source # | |
HasNanoSecond TimeOfDay Source # | |
Defined in Polysemy.Time.Calendar nanoSecond :: TimeOfDay -> NanoSeconds Source # |
class Calendar dt where Source #
Construct datetimes, dates or times from integers.
type CalendarDate dt :: Type Source #
type CalendarTime dt :: Type Source #
mkDate :: Int64 -> Int64 -> Int64 -> CalendarDate dt Source #
mkTime :: Int64 -> Int64 -> Int64 -> CalendarTime dt Source #
mkDatetime :: Int64 -> Int64 -> Int64 -> Int64 -> Int64 -> Int64 -> dt Source #
Instances
Calendar UTCTime Source # | |
Defined in Polysemy.Time.Calendar type CalendarDate UTCTime Source # type CalendarTime UTCTime Source # |