thyme-0.3.5.5: A faster time library
Safe HaskellNone
LanguageHaskell2010

Data.Thyme.Time

Description

This module provides compatibility instances and wrappers for the things that thyme does differently from time, and allows it to be used as a drop-in replacement for the latter, with the exceptions noted below:

  • When constructing an UTCTime or UniversalTime, use mkUTCTime or mkModJulianDate in place of UTCTime or ModJulianDate.
  • Instead of pattern matching on UTCTime, use unUTCTime to get a UTCView, which has a constructor UTCTime with the same fields. For ModJulianDate, use getModJulianDate. ViewPatterns may make the transition more seamless.
  • Where a third party library uses time, you can use toThyme and fromThyme to convert between the corresponding types.
  • Years are Ints, not Integers: you may need fromIntegral.

You shouldn't need to use lens or vector-space directly if you don't want to. However if you do use vector-space and wish to avoid the RealFrac instances for DiffTime and NominalDiffTime, import Data.Thyme.Time.Core instead.

Anything else is probably not intentional, and you should either contact me via IRC or file an issue at https://github.com/liyang/thyme/issues.

Documentation

Orphan instances

Fractional Micro Source # 
Instance details

Methods

(/) :: Micro -> Micro -> Micro

recip :: Micro -> Micro

fromRational :: Rational -> Micro

Fractional DiffTime Source # 
Instance details

Fractional NominalDiffTime Source # 
Instance details

Num Micro Source # 
Instance details

Methods

(+) :: Micro -> Micro -> Micro

(-) :: Micro -> Micro -> Micro

(*) :: Micro -> Micro -> Micro

negate :: Micro -> Micro

abs :: Micro -> Micro

signum :: Micro -> Micro

fromInteger :: Integer -> Micro

Num DiffTime Source # 
Instance details

Num NominalDiffTime Source # 
Instance details

Real Micro Source # 
Instance details

Methods

toRational :: Micro -> Rational

Real DiffTime Source # 
Instance details

Methods

toRational :: DiffTime -> Rational

Real NominalDiffTime Source # 
Instance details

Methods

toRational :: NominalDiffTime -> Rational

RealFrac Micro Source # 
Instance details

Methods

properFraction :: Integral b => Micro -> (b, Micro)

truncate :: Integral b => Micro -> b

round :: Integral b => Micro -> b

ceiling :: Integral b => Micro -> b

floor :: Integral b => Micro -> b

RealFrac DiffTime Source # 
Instance details

Methods

properFraction :: Integral b => DiffTime -> (b, DiffTime)

truncate :: Integral b => DiffTime -> b

round :: Integral b => DiffTime -> b

ceiling :: Integral b => DiffTime -> b

floor :: Integral b => DiffTime -> b

RealFrac NominalDiffTime Source # 
Instance details

Methods

properFraction :: Integral b => NominalDiffTime -> (b, NominalDiffTime)

truncate :: Integral b => NominalDiffTime -> b

round :: Integral b => NominalDiffTime -> b

ceiling :: Integral b => NominalDiffTime -> b

floor :: Integral b => NominalDiffTime -> b