Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module provides quasi quoters for writing time literals.
First enable the QuasiQuotes
language extension, then you will be able to
write the the following:
>>>
[utcIso8601| 2048-12-01 |] :: UTCTime
2048-12-01 00:00:00 UTC
Unparseable dates will throw errors at compile time.
Zoned time quoters are not provided as the time library doesn't seem to do anything with "%Z".
- utcIso8601 :: QuasiQuoter
- utcIso8601ms :: QuasiQuoter
- data UTCTime :: * = UTCTime {
- utctDay :: Day
- utctDayTime :: DiffTime
- utcFormat :: String -> QuasiQuoter
ISO8601 UTC time QuasiQuoters
utcIso8601 :: QuasiQuoter Source
ISO8601 date with seconds and optional "." with more precision
following to a UTCTime
.
Do not specify a timezone, the time should be UTC.
>>>
[utcIso8601| 2048-12-01 |] :: UTCTime
2048-12-01 00:00:00 UTC
utcIso8601ms :: QuasiQuoter Source
ISO8601 date with seconds and optional "." with more precision
following to a UTCTime
.
Do not specify a timezone, the time should be UTC.
>>>
[utcIso8601ms| 2099-01-01T00:00:00.42324 |]
2099-01-01 00:00:00.42324 UTC
Re-exports
data UTCTime :: *
This is the simplest representation of UTC. It consists of the day number, and a time offset from midnight. Note that if a day has a leap second added to it, it will have 86401 seconds.
UTCTime | |
|