text-builder-time-0.1: Various formats for "time" in terms of "text-builder"
Safe HaskellSafe-Inferred
LanguageHaskell2010

TextBuilderTime.Iso8601

Synopsis

Documentation

day :: Day -> TextBuilder Source #

Convert Day to ISO-8601 format.

>>> day (fromGregorian 2022 6 16)
"2022-06-16"

utcTime :: UTCTime -> TextBuilder Source #

Convert UTCTime to ISO-8601 format.

>>> utcTime (UTCTime (fromGregorian 2022 6 16) 0)
"2022-06-16T00:00:00Z"
>>> utcTime (UTCTime (fromGregorian 2022 6 16) 0.000001)
"2022-06-16T00:00:00.000001Z"
>>> utcTime (UTCTime (fromGregorian 2022 6 16) 0.000000001)
"2022-06-16T00:00:00.000000001Z"
>>> utcTime (UTCTime (fromGregorian 2022 6 16) (3 * 60 * 60 + 4 * 60 + 5))
"2022-06-16T03:04:05Z"