format : FormatType -> Internal.Locale.Locale -> Time.Zone -> Time.Posix -> String
Format a Time.Posix
value, using the format for a specified FormatType
, Locale
, and Time.Zone
import Time
import Cldr.Locale exposing (en)
format short en Time.utc (Time.millisToPosix 959829796738)
--> "6/1/00, 3:23 AM"
The different combinations of date and time that can be formatted.
short : FormatType
Use Short
for both date and time
medium : FormatType
Use Medium
for both date and time
long : FormatType
Use Long
for both date and time
full : FormatType
Use Full
for both date and time