canceraiddev / elm-form-builder / Form.Lib.Time

Helper functions for working with elm/time

Time

toDateString : Time.Posix -> String

Uses Iso8601.fromTime produces a date with timestamp and takes first 10 characters to return "YYYY-MM-DD"

offsetYear : Basics.Int -> Time.Posix -> Time.Posix

Offsets a time by the given number of years and returns a new time, floored to the start of the year.

offsetDay : Basics.Int -> Time.Posix -> Time.Posix

Offsets a time by the given number of days and returns a new time, floored to the start of the day.