| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Codec.JSON.Decoder.Time
Description
Functions for decoding common time formats in RFC 8259 JSONs.
Calendar
quarter :: Decoder Quarter Source #
Decode a JSON string as a quarter, in the yyyy-Qqq format.
Note that year quarters are not defined by ISO 8601, this is an informal convention.
Month
monthDate :: Decoder Day Source #
Decode a JSON string as an RFC 3339 month date, in the yyyy-mm-dd format.
Week
weekDate :: Decoder Day Source #
Decode a JSON string as an ISO 8601 week date, in the yyyy-Www-d format.
Ordinal
ordinalDate :: Decoder Day Source #
Decode a JSON string as an ISO 8601 ordinal date, in the yyyy-ddd format.
Time of day
timeOfDay :: Decoder TimeOfDay Source #
Decode a JSON string as an RFC 3339 time of day, in the hh:mm:ss[.s…] format.
Local
localTime :: Decoder LocalTime Source #
Decode a JSON string as an RFC 3339 local time, in the yyyy-mm-ddThh:mm:ss[.s…] format.
Either t or space is accepted instead of T.