MyApp.Cldr.DateTime.Formatter.format

You're seeing just the function format, go back to MyApp.Cldr.DateTime.Formatter module for more information.
Link to this function

format(date, format, locale \\ Cldr.get_locale(), options \\ [])

View Source

Specs

Returns the formatted and localised date, time or datetime for a given Date, Time, DateTime or struct with the appropriate fields.

Arguments

Options

  • :number_system. The resulting formatted and localised date/time string will be transliterated into this number system. Number system is anything returned from inspect(unquote(backend)).Number.System.number_systems_for/1

NOTE This function is called by Cldr.Date/to_string/2, Cldr.Time.to_string/2 and Cldr.DateTime.to_string/2 which is the preferred API.

Examples

iex> Elixir.MyApp.Cldr.DateTime.Formatter.format %{year: 2017, month: 9, day: 3, hour: 10, minute: 23},
...> "yy/MM/dd hh:MM", "en"
{:ok, "17/09/03 10:09"}