api-tools-0.9.0.0: DSL for generating API boilerplate and docs
Safe HaskellNone
LanguageHaskell2010

Data.API.Time

Synopsis

Documentation

printUTC :: UTCTime -> Text Source #

Render a UTCTime in ISO 8601 format to a precision of seconds (i.e. omitting any subseconds).

parseUTC :: Text -> Maybe UTCTime Source #

Parse text as a UTCTime in ISO 8601 format or a number of slight variations thereof (the T may be replaced with a space, and the seconds, milliseconds and/or Z timezone indicator may optionally be omitted).

Time zone designations other than Z for UTC are not currently supported.

parseDay :: Text -> Maybe Day Source #

Parse text as a Day in YYYY-MM-DD format.

unsafeParseUTC :: HasCallStack => Text -> UTCTime Source #

Variant of parseUTC that throws an error if the input text could not be parsed.

unsafeParseDay :: HasCallStack => Text -> Day Source #

Variant of parseDay that throws an error if the input text could not be parsed.

parseUTC_old :: Text -> Maybe UTCTime Source #

Parse text as a UTCTime in ISO 8601 format or a number of slight variations thereof (the T may be replaced with a space, and the seconds and timezone indicator may optionally be omitted).

Orphan instances

Arbitrary UTCTime Source # 
Instance details