ecluse:ecluse-core
Safe HaskellNone
LanguageGHC2021

Ecluse.Core.Text.Iso8601

Description

ISO 8601 UTC time stamps, read and rendered without the library's parser or a text builder. A registry document holds one for each release or file, and an npm listing renders one for each release. The read takes one layout and declines every other, and the render leaves what it does not write to iso8601Show.

Synopsis

Documentation

readIso8601Utc :: Text -> Maybe UTCTime Source #

The instant of a stamp written YYYY-MM-DDTHH:MM:SS, an optional fraction of 1 to 12 digits, then Z. Nothing for every other text, which includes stamps that a wider parser reads.

renderIso8601Utc :: UTCTime -> Text Source #

The text of iso8601Show, written to one buffer for years 0 to 9999 and a time of day below 86 400 s. In those years a negative time of day keeps a signed hour, where iso8601Show borrows from the day.