| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
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
UTCTimeorUniversalTime, usemkUTCTimeormkModJulianDatein place ofUTCTimeorModJulianDate. - Instead of pattern matching on
UTCTime, useunUTCTimeto get aUTCView, which has a constructorUTCTimewith the same fields. ForModJulianDate, usegetModJulianDate.ViewPatternsmay make the transition more seamless. - Where a third party library uses
time, you can usetoThymeandfromThymeto convert between the corresponding types. Years areInts, notIntegers: 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