| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Composite.Aeson.Formats.DateTime
Synopsis
- data DateTimeFormat = DateTimeFormat {}
- regularDateTimeFormat :: String -> String -> DateTimeFormat
- dateTimeJsonFormat :: (ParseTime t, FormatTime t) => TimeLocale -> NonEmpty DateTimeFormat -> JsonFormat e t
- iso8601DateJsonFormat :: JsonFormat e Day
- iso8601DateTimeJsonFormat :: JsonFormat e UTCTime
- iso8601TimeJsonFormat :: JsonFormat e TimeOfDay
Documentation
data DateTimeFormat Source #
Structure carrying the date/time format string along with an example for error messaging and functions which optionally permute the input or output before using the format.
Constructors
| DateTimeFormat | |
Fields | |
regularDateTimeFormat :: String -> String -> DateTimeFormat Source #
Construct a DateTimeFormat with no pre- or post- processing.
dateTimeJsonFormat :: (ParseTime t, FormatTime t) => TimeLocale -> NonEmpty DateTimeFormat -> JsonFormat e t Source #
JsonFormat for any type which ParseTime and FormatTime are defined for which maps to JSON via the first format given and maps from JSON via
any format given.
iso8601DateJsonFormat :: JsonFormat e Day Source #
ISO8601 extended date format (yyyy-mm-dd).
iso8601DateTimeJsonFormat :: JsonFormat e UTCTime Source #
ISO8601 extended date/time format (yyyy-mm-ddThh:mm:ss.sssZ or yyyy-mm-ttThh:mm:ssZ)
iso8601TimeJsonFormat :: JsonFormat e TimeOfDay Source #
ISO8601 extended time format (hh:mm:ss.sss or hh:mm:ss)