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

Safe HaskellSafe-Inferred
LanguageHaskell98

Data.Time.ISO8601

Synopsis

Documentation

formatISO8601 :: UTCTime -> String Source

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.

formatISO8601Millis :: UTCTime -> String Source

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 -> String Source

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 -> String Source

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 -> String Source

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 -> String Source

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 UTCTime Source

Parses an ISO 8601 string.