composite-aeson-0.2.0.0: JSON for Vinyl/Frames records

Safe HaskellNone
LanguageHaskell2010

Composite.Aeson.DateTimeFormatUtils

Synopsis

Documentation

fixupTzIn :: String -> String Source #

Given a string, remove a trailing Z (which is ISO8601 acceptable) and replace it with +00:00 (which is ParseTime acceptable)

fixupTzOut :: String -> String Source #

Given a string, remove a trailing +00:00 (which FormatTime) and replace it with Z (which is ISO8601 standard)

fixupMs :: String -> String Source #

Given a ISO8601-ish string generated by FormatTime with %Q, generating between no decimal and 12 digits of decimal, normalize it to exactly three digits.

E.g. from 2017-03-30T13:00:00Z generate 2017-03-30T13:00:00.000Z, and from 2017-03-30T13:00:00.123456789Z generate 2017-03-30T12:00:00.123Z