iso8601-time-0.1.1: Convert to/from the ISO 8601 time format

Safe HaskellNone

Data.Time.ISO8601

Synopsis

Documentation

formatISO8601 :: UTCTime -> StringSource

Formats a time in ISO 8601, with up to 12 second decimals.

This is the formatTime format %FT%T%Q == %%Y-%m-%dT%%H:%M:%S%Q.

For

formatISO8601Millis :: UTCTime -> StringSource

Formats a time in ISO 8601 with up to millisecond precision and trailing zeros. The format is precisely:

YYYY-MM-DDTHH:mm:ss.sssZ

formatISO8601Micros :: UTCTime -> StringSource

Formats a time in ISO 8601 with up to microsecond precision and trailing zeros. The format is precisely:

YYYY-MM-DDTHH:mm:ss.ssssssZ

formatISO8601Nanos :: UTCTime -> StringSource

Formats a time in ISO 8601 with up to nanosecond precision and trailing zeros. The format is precisely:

YYYY-MM-DDTHH:mm:ss.sssssssssZ

formatISO8601Picos :: UTCTime -> StringSource

Formats a time in ISO 8601 with up to picosecond precision and trailing zeros. The format is precisely:

YYYY-MM-DDTHH:mm:ss.ssssssssssssZ

formatISO8601Javascript :: UTCTime -> StringSource

Formats a time like JavaScript's new Date().toISOString() as specified by Mozilla: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString

This is an alias for formatISO8601Millis.

parseISO8601 :: String -> Maybe UTCTimeSource

Parses an ISO 8601 string.