thyme-0.3.5.5: A faster time library

Safe Haskell | None
Language | Haskell2010

Data.Thyme.LocalTime

Contents

- Time zones
- Time of day
- Local Time
- Zoned Time
- Lenses
- Orphan instances

Synopsis

- type Minutes = Int
- type Hours = Int
- data TimeZone = TimeZone {
  - timeZoneMinutes :: !Minutes
  - timeZoneSummerOnly :: !Bool
  - timeZoneName :: String
  }
- timeZoneOffsetString :: TimeZone -> String
- minutesToTimeZone :: Minutes -> TimeZone
- hoursToTimeZone :: Hours -> TimeZone
- utc :: TimeZone
- getTimeZone :: UTCTime -> IO TimeZone
- getCurrentTimeZone :: IO TimeZone
- type Hour = Int
- type Minute = Int
- data TimeOfDay = TimeOfDay {
  - todHour :: !Hour
  - todMin :: !Minute
  - todSec :: !DiffTime
  }
- minuteLength :: Hour -> Minute -> DiffTime
- midnight :: TimeOfDay
- midday :: TimeOfDay
- makeTimeOfDayValid :: Hour -> Minute -> DiffTime -> Maybe TimeOfDay
- timeOfDay :: Iso' DiffTime TimeOfDay
- addMinutes :: Minutes -> TimeOfDay -> (Days, TimeOfDay)
- dayFraction :: Iso' TimeOfDay Rational
- data LocalTime = LocalTime {
  - localDay :: !Day
  - localTimeOfDay :: !TimeOfDay
  }
- utcLocalTime :: TimeZone -> Iso' UTCTime LocalTime
- ut1LocalTime :: Rational -> Iso' UniversalTime LocalTime
- data ZonedTime = ZonedTime {
  - zonedTimeToLocalTime :: !LocalTime
  - zonedTimeZone :: !TimeZone
  }
- zonedTime :: Iso' (TimeZone, UTCTime) ZonedTime
- getZonedTime :: IO ZonedTime
- utcToLocalZonedTime :: UTCTime -> IO ZonedTime
- _timeZoneMinutes :: Lens' TimeZone Minutes
- _timeZoneSummerOnly :: Lens' TimeZone Bool
- _timeZoneName :: Lens' TimeZone String
- _todHour :: Lens' TimeOfDay Hour
- _todMin :: Lens' TimeOfDay Minute
- _todSec :: Lens' TimeOfDay DiffTime
- _localDay :: Lens' LocalTime Day
- _localTimeOfDay :: Lens' LocalTime TimeOfDay
- _zonedTimeToLocalTime :: Lens' ZonedTime LocalTime
- _zonedTimeZone :: Lens' ZonedTime TimeZone

# Documentation

type Minutes = Int Source #

type Hours = Int Source #

# Time zones

data TimeZone Source #

Constructors

TimeZone |

Fields

- timeZoneMinutes :: !Minutes
- timeZoneSummerOnly :: !Bool
- timeZoneName :: String

#### Instances

Instances details

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

Instance details

Defined in Data.Thyme.LocalTime

Methods

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

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

toConstr :: TimeZone -> Constr

dataTypeOf :: TimeZone -> DataType

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

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

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

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

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

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

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

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

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

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

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

Instance details

Defined in Data.Thyme.LocalTime

Methods

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

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

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

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

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

randomIO :: IO TimeZone Source #

NFData TimeZone Source # |
Instance details Defined in Data.Thyme.LocalTime Methods rnf :: TimeZone -> ()
ParseTime TimeZone Source # |
Instance details Defined in Data.Thyme.Format Methods buildTime :: TimeParse -> TimeZone Source #
FormatTime TimeZone Source # |
Instance details Defined in Data.Thyme.Format Methods showsTime :: TimeLocale -> TimeZone -> (Char -> ShowS) -> Char -> ShowS Source #
Thyme TimeZone TimeZone Source # |
Instance details Defined in Data.Thyme.Time.Core Methods thyme :: Iso' TimeZone0 TimeZone Source #
type Rep TimeZone Source # |

Instance details

Defined in Data.Thyme.LocalTime

type Rep TimeZone = D1 ('MetaData "TimeZone" "Data.Thyme.LocalTime" "thyme-0.3.5.5-8yk8awDjzEHHYSq2xJCwO3" 'False) (C1 ('MetaCons "TimeZone" 'PrefixI 'True) (S1 ('MetaSel ('Just "timeZoneMinutes") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Minutes) :*: (S1 ('MetaSel ('Just "timeZoneSummerOnly") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Just "timeZoneName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String))))

timeZoneOffsetString :: TimeZone -> String Source #

Text representing the offset of this timezone, e.g. "-0800" or "+0400" (like %z in `formatTime`)

minutesToTimeZone :: Minutes -> TimeZone Source #

Create a nameless non-summer timezone for this number of minutes

hoursToTimeZone :: Hours -> TimeZone Source #

Create a nameless non-summer timezone for this number of hours

utc :: TimeZone Source #

getTimeZone :: UTCTime -> IO TimeZone Source #

getCurrentTimeZone :: IO TimeZone Source #

# Time of day

type Hour = Int Source #

type Minute = Int Source #

data TimeOfDay Source #

Constructors

TimeOfDay |

Fields

- todHour :: !Hour
- todMin :: !Minute
- todSec :: !DiffTime

#### Instances

Instances details

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

Instance details

Defined in Data.Thyme.LocalTime

Methods

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

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

toConstr :: TimeOfDay -> Constr

dataTypeOf :: TimeOfDay -> DataType

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

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

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

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

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

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

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

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

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

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

Ord TimeOfDay Source # |
Instance details Defined in Data.Thyme.LocalTime Methods compare :: TimeOfDay -> TimeOfDay -> Ordering (<) :: TimeOfDay -> TimeOfDay -> Bool (<=) :: TimeOfDay -> TimeOfDay -> Bool (>) :: TimeOfDay -> TimeOfDay -> Bool (>=) :: TimeOfDay -> TimeOfDay -> Bool max :: TimeOfDay -> TimeOfDay -> TimeOfDay min :: TimeOfDay -> TimeOfDay -> TimeOfDay
Read TimeOfDay |
Instance details Defined in Data.Thyme.Format Methods readsPrec :: Int -> ReadS TimeOfDay readList :: ReadS [TimeOfDay] readPrec :: ReadPrec TimeOfDay readListPrec :: ReadPrec [TimeOfDay]
Show TimeOfDay Source # |
Instance details Defined in Data.Thyme.LocalTime Methods showsPrec :: Int -> TimeOfDay -> ShowS show :: TimeOfDay -> String showList :: [TimeOfDay] -> ShowS
Generic TimeOfDay Source # |
Instance details Defined in Data.Thyme.LocalTime Associated Types type Rep TimeOfDay :: Type -> Type Methods from :: TimeOfDay -> Rep TimeOfDay x to :: Rep TimeOfDay x -> TimeOfDay
Arbitrary TimeOfDay Source # |
Instance details Defined in Data.Thyme.LocalTime Methods arbitrary :: Gen TimeOfDay Source # shrink :: TimeOfDay -> [TimeOfDay] Source #
CoArbitrary TimeOfDay Source # |
Instance details Defined in Data.Thyme.LocalTime Methods coarbitrary :: TimeOfDay -> Gen b -> Gen b Source #
Random TimeOfDay Source # |

Instance details

Defined in Data.Thyme.LocalTime

Methods

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

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

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

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

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

randomIO :: IO TimeOfDay Source #

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

Instance details

Defined in Data.Thyme.LocalTime

Methods

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

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

basicLength :: Vector TimeOfDay -> Int Source #

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

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

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

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

MVector MVector TimeOfDay Source # |

Instance details

Defined in Data.Thyme.LocalTime

Methods

basicLength :: MVector s TimeOfDay -> Int Source #

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

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

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

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

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

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

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

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

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

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

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

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

Thyme TimeOfDay TimeOfDay Source # |
Instance details Defined in Data.Thyme.Time.Core Methods thyme :: Iso' TimeOfDay0 TimeOfDay Source #
type Rep TimeOfDay Source # |

Instance details

Defined in Data.Thyme.LocalTime

type Rep TimeOfDay = D1 ('MetaData "TimeOfDay" "Data.Thyme.LocalTime" "thyme-0.3.5.5-8yk8awDjzEHHYSq2xJCwO3" 'False) (C1 ('MetaCons "TimeOfDay" 'PrefixI 'True) (S1 ('MetaSel ('Just "todHour") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Hour) :*: (S1 ('MetaSel ('Just "todMin") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Minute) :*: S1 ('MetaSel ('Just "todSec") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 DiffTime))))

newtype Vector TimeOfDay Source # |
Instance details Defined in Data.Thyme.LocalTime newtype Vector TimeOfDay = V_TimeOfDay (Vector Int64)
newtype MVector s TimeOfDay Source # |
Instance details Defined in Data.Thyme.LocalTime newtype MVector s TimeOfDay = MV_TimeOfDay (MVector s Int64)

minuteLength :: Hour -> Minute -> DiffTime Source #

midnight :: TimeOfDay Source #

Hour zero

midday :: TimeOfDay Source #

Hour twelve

makeTimeOfDayValid :: Hour -> Minute -> DiffTime -> Maybe TimeOfDay Source #

timeOfDay :: Iso' DiffTime TimeOfDay Source #

addMinutes :: Minutes -> TimeOfDay -> (Days, TimeOfDay) Source #

Add some minutes to a `TimeOfDay`; result comes with a day adjustment.

dayFraction :: Iso' TimeOfDay Rational Source #

# Local Time

data LocalTime Source #

Constructors

LocalTime |

Fields

- localDay :: !Day
- localTimeOfDay :: !TimeOfDay

#### Instances

Instances details

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

Instance details

Defined in Data.Thyme.LocalTime

Methods

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

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

toConstr :: LocalTime -> Constr

dataTypeOf :: LocalTime -> DataType

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

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

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

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

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

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

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

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

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

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

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

Instance details

Defined in Data.Thyme.LocalTime

Methods

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

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

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

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

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

randomIO :: IO LocalTime Source #

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

Instance details

Defined in Data.Thyme.LocalTime

Methods

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

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

basicLength :: Vector LocalTime -> Int Source #

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

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

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

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

MVector MVector LocalTime Source # |

Instance details

Defined in Data.Thyme.LocalTime

Methods

basicLength :: MVector s LocalTime -> Int Source #

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

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

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

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

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

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

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

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

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

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

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

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

Thyme LocalTime LocalTime Source # |
Instance details Defined in Data.Thyme.Time.Core Methods thyme :: Iso' LocalTime0 LocalTime Source #
type Rep LocalTime Source # |

Instance details

Defined in Data.Thyme.LocalTime

type Rep LocalTime = D1 ('MetaData "LocalTime" "Data.Thyme.LocalTime" "thyme-0.3.5.5-8yk8awDjzEHHYSq2xJCwO3" 'False) (C1 ('MetaCons "LocalTime" 'PrefixI 'True) (S1 ('MetaSel ('Just "localDay") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Day) :*: S1 ('MetaSel ('Just "localTimeOfDay") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 TimeOfDay)))

newtype Vector LocalTime Source # |
Instance details Defined in Data.Thyme.LocalTime newtype Vector LocalTime = V_LocalTime (Vector (Day, TimeOfDay))
newtype MVector s LocalTime Source # |
Instance details Defined in Data.Thyme.LocalTime newtype MVector s LocalTime = MV_LocalTime (MVector s (Day, TimeOfDay))

utcLocalTime :: TimeZone -> Iso' UTCTime LocalTime Source #

ut1LocalTime :: Rational -> Iso' UniversalTime LocalTime Source #

# Zoned Time

data ZonedTime Source #

Constructors

ZonedTime |

Fields

- zonedTimeToLocalTime :: !LocalTime
- zonedTimeZone :: !TimeZone

#### Instances

Instances details

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

Instance details

Defined in Data.Thyme.LocalTime

Methods

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

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

toConstr :: ZonedTime -> Constr

dataTypeOf :: ZonedTime -> DataType

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

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

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

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

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

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

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

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

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

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

Ord ZonedTime Source # |
Instance details Defined in Data.Thyme.LocalTime Methods compare :: ZonedTime -> ZonedTime -> Ordering (<) :: ZonedTime -> ZonedTime -> Bool (<=) :: ZonedTime -> ZonedTime -> Bool (>) :: ZonedTime -> ZonedTime -> Bool (>=) :: ZonedTime -> ZonedTime -> Bool max :: ZonedTime -> ZonedTime -> ZonedTime min :: ZonedTime -> ZonedTime -> ZonedTime
Read ZonedTime |
Instance details Defined in Data.Thyme.Format Methods readsPrec :: Int -> ReadS ZonedTime readList :: ReadS [ZonedTime] readPrec :: ReadPrec ZonedTime readListPrec :: ReadPrec [ZonedTime]
Show ZonedTime Source # |
Instance details Defined in Data.Thyme.LocalTime Methods showsPrec :: Int -> ZonedTime -> ShowS show :: ZonedTime -> String showList :: [ZonedTime] -> ShowS
Generic ZonedTime Source # |
Instance details Defined in Data.Thyme.LocalTime Associated Types type Rep ZonedTime :: Type -> Type Methods from :: ZonedTime -> Rep ZonedTime x to :: Rep ZonedTime x -> ZonedTime
Arbitrary ZonedTime Source # |
Instance details Defined in Data.Thyme.LocalTime Methods arbitrary :: Gen ZonedTime Source # shrink :: ZonedTime -> [ZonedTime] Source #
CoArbitrary ZonedTime Source # |
Instance details Defined in Data.Thyme.LocalTime Methods coarbitrary :: ZonedTime -> Gen b -> Gen b Source #
ToJSON ZonedTime Source # |
Instance details Defined in Data.Thyme.Format.Aeson Methods toJSON :: ZonedTime -> Value Source # toEncoding :: ZonedTime -> Encoding Source # toJSONList :: [ZonedTime] -> Value Source # toEncodingList :: [ZonedTime] -> Encoding Source #
FromJSON ZonedTime Source # |
Instance details Defined in Data.Thyme.Format.Aeson Methods parseJSON :: Value -> Parser ZonedTime Source # parseJSONList :: Value -> Parser [ZonedTime] Source #
Random ZonedTime Source # |

Instance details

Defined in Data.Thyme.LocalTime

Methods

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

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

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

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

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

randomIO :: IO ZonedTime Source #

NFData ZonedTime Source # |
Instance details Defined in Data.Thyme.LocalTime Methods rnf :: ZonedTime -> ()
ParseTime ZonedTime Source # |
Instance details Defined in Data.Thyme.Format Methods buildTime :: TimeParse -> ZonedTime Source #
FormatTime ZonedTime Source # |
Instance details Defined in Data.Thyme.Format Methods showsTime :: TimeLocale -> ZonedTime -> (Char -> ShowS) -> Char -> ShowS Source #
Thyme ZonedTime ZonedTime Source # |
Instance details Defined in Data.Thyme.Time.Core Methods thyme :: Iso' ZonedTime0 ZonedTime Source #
type Rep ZonedTime Source # |

Instance details

Defined in Data.Thyme.LocalTime

type Rep ZonedTime = D1 ('MetaData "ZonedTime" "Data.Thyme.LocalTime" "thyme-0.3.5.5-8yk8awDjzEHHYSq2xJCwO3" 'False) (C1 ('MetaCons "ZonedTime" 'PrefixI 'True) (S1 ('MetaSel ('Just "zonedTimeToLocalTime") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 LocalTime) :*: S1 ('MetaSel ('Just "zonedTimeZone") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TimeZone)))

zonedTime :: Iso' (TimeZone, UTCTime) ZonedTime Source #

getZonedTime :: IO ZonedTime Source #

utcToLocalZonedTime :: UTCTime -> IO ZonedTime Source #

# Lenses

_timeZoneMinutes :: Lens' TimeZone Minutes Source #

_timeZoneSummerOnly :: Lens' TimeZone Bool Source #

_timeZoneName :: Lens' TimeZone String Source #

_todHour :: Lens' TimeOfDay Hour Source #

_todMin :: Lens' TimeOfDay Minute Source #

_todSec :: Lens' TimeOfDay DiffTime Source #

_localDay :: Lens' LocalTime Day Source #

_localTimeOfDay :: Lens' LocalTime TimeOfDay Source #

_zonedTimeToLocalTime :: Lens' ZonedTime LocalTime Source #

_zonedTimeZone :: Lens' ZonedTime TimeZone Source #

# Orphan instances

Show UTCTime Source # |
Instance details Methods showsPrec :: Int -> UTCTime -> ShowS show :: UTCTime -> String showList :: [UTCTime] -> ShowS