Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
This module provides the Thyme
typeclass, and instances for
converting between Data.Time and Data.Thyme types. It also provides
compatibility wrappers for existing code using Data.Time.
Note that we do not provide Num
hierarchy instances for DiffTime
nor
NominalDiffTime
here. If you want to use them anyway despite parts of
them being ill-defined (e.g. (
on *
)DiffTime
), import
Data.Thyme.Time instead.
Documentation
module Data.Thyme
class Thyme time thyme | thyme -> time where Source #
Typeclass for converting between Data.Time and Data.Thyme types.
thyme :: Iso' time thyme Source #
Convert between Data.Time and Data.Thyme types.
> :set -t > import qualified Data.Time >thyme
#
(fromSeconds'
10 ::DiffTime
) 10s it ::DiffTime
>secondsToDiffTime
10^.
thyme
::DiffTime
10s it ::DiffTime
Instances
Thyme Day Day Source # | |
Thyme AbsoluteTime AbsoluteTime Source # | |
Defined in Data.Thyme.Time.Core thyme :: Iso' AbsoluteTime0 AbsoluteTime Source # | |
Thyme DiffTime DiffTime Source # | |
Thyme NominalDiffTime NominalDiffTime Source # | |
Defined in Data.Thyme.Time.Core thyme :: Iso' NominalDiffTime0 NominalDiffTime Source # | |
Thyme UTCTime UTCTime Source # | |
Thyme UTCTime UTCView Source # | |
Thyme UniversalTime UniversalTime Source # | |
Defined in Data.Thyme.Time.Core thyme :: Iso' UniversalTime0 UniversalTime Source # | |
Thyme LocalTime LocalTime Source # | |
Defined in Data.Thyme.Time.Core thyme :: Iso' LocalTime0 LocalTime Source # | |
Thyme TimeOfDay TimeOfDay Source # | |
Defined in Data.Thyme.Time.Core thyme :: Iso' TimeOfDay0 TimeOfDay Source # | |
Thyme TimeZone TimeZone Source # | |
Thyme ZonedTime ZonedTime Source # | |
Defined in Data.Thyme.Time.Core thyme :: Iso' ZonedTime0 ZonedTime Source # |