Safe Haskell | None |
---|---|
Language | Haskell2010 |
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
orUniversalTime
, usemkUTCTime
ormkModJulianDate
in place ofUTCTime
orModJulianDate
. - Instead of pattern matching on
UTCTime
, useunUTCTime
to get aUTCView
, which has a constructorUTCTime
with the same fields. ForModJulianDate
, usegetModJulianDate
.ViewPatterns
may make the transition more seamless. - Where a third party library uses
time
, you can usetoThyme
andfromThyme
to convert between the corresponding types. Year
s areInt
s, notInteger
s: you may needfromIntegral
.
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
module Data.Thyme.Time.Core