format : FormatType -> Internal.Locale.Locale -> Date -> String
Formats a Date
using the specified FormatType
and Locale
.
import Cldr.Format.Length exposing (Length(..))
import Cldr.Locale exposing (en)
import Date
import Time exposing (Month(..))
let
date = Date.fromCalendarDate 2000 Jan 1
in
format (WithLength Short) en date
--> "1/1/00"
Dates can be formatted using a
Cldr.Format.Length.Length
or Cldr.Format.Options.DateOptions
.