Cldr.Format.DateTime

DateTime Formatting

format : FormatType -> Locale -> Zone -> 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"

Format Type

= DateOnly Length
| TimeOnly Length
| DateAndTime
{ date : Length
, time : Length
}

The different combinations of date and time that can be formatted.

Use Short for both date and time

Use Medium for both date and time

Use Long for both date and time

Use Full for both date and time