Add three ISO8601 compatible formats
This commit is contained in:
parent
523fe563c9
commit
539b8c93fa
1 changed files with 8 additions and 0 deletions
|
@ -13,6 +13,9 @@ module Servant.API.Times
|
|||
, getFormat
|
||||
, renderTime
|
||||
, parseTime
|
||||
, ISO8601Date
|
||||
, ISO8601DateTime
|
||||
, ISO8601DateTimeZ
|
||||
) where
|
||||
|
||||
import Data.Typeable (Typeable)
|
||||
|
@ -27,6 +30,11 @@ import Data.Proxy
|
|||
import Control.Monad ((>=>))
|
||||
import Control.Arrow (first)
|
||||
|
||||
|
||||
type ISO8601Date = "%Y-%m-%d"
|
||||
type ISO8601DateTime = "%Y-%m-%dT%H:%M:%S"
|
||||
type ISO8601DateTimeZ = "%Y-%m-%dT%H:%M:%S%z"
|
||||
|
||||
-- | A wrapper around a time type which can be parsed/rendered to with `format',
|
||||
-- as specified in 'Data.Time.Format'.
|
||||
--
|
||||
|
|
Loading…
Reference in a new issue