rluiten/elm-date-extra/5.0.1

NOTE: this package is not compatible with Elm 0.19.1

Date.Extra.Format

Date Format, turning dates into strings.

The format code originally came from and was modified and extended from. https://github.com/mgold/elm-date-format/blob/1.0.4/src/Date/Format.elm

Date presentation

format : Config -> String -> Date -> String

Use a format string to format a date. This gets time zone offset from provided date.

formatUtc : Config -> String -> Date -> String

Convert date to utc then format it with offset set to 0 if rendered.

formatOffset : Config -> Int -> String -> Date -> String

This adjusts date for offset, and renders with the offset

Extra presentation convenience

isoString : Date -> String

Return date and time as string in local zone.

isoStringNoOffset : Date -> String

Return date and time as string in local zone, without a timezone offset as otuput by Format.isoString. Introduced to deal with dates assuming local time zone.

utcIsoString : Date -> String

Return date and time as string in ISO form with Z for UTC offset.

Low level formats used in specific places in library.

isoDateString : Date -> String

Return date as string.

Low level routine required by areas like checkDateResult to avoid recursive loops in Format.format.

utcIsoDateString : Date -> String

Utc variant of isoDateString.

Low level routine required by areas like checkDateResult to avoid recursive loops in Format.format.

Useful strings for format

isoFormat : String

ISO date time, 24hr.

isoMsecFormat : String

ISO Date time with milliseconds, 24hr.

ISO Date time with timezone, 24hr.

ISO Date time with milliseconds and timezone, 24hr.

isoDateFormat : String

ISO Date.

isoTimeFormat : String

ISO Time 24hr.

Copyright (c) 2016 Robin Luiten