MyApp.Cldr.DateTime.Format.date_time_formats
You're seeing just the function
date_time_formats
, go back to MyApp.Cldr.DateTime.Format module for more information.
Link to this function
date_time_formats(locale \\ MyApp.Cldr.get_locale(), calendar \\ Cldr.Calendar.default_cldr_calendar())
View SourceSpecs
date_time_formats(Cldr.Locale.locale_name() | Cldr.LanguageTag.t(), calendar()) :: {:ok, map()} | {:error, {module(), String.t()}}
Returns a map of the standard datetime formats for a given locale and calendar.
Arguments
locale
is any locale returned byCldr.known_locale_names/0
calendar
is any calendar returned byCldr.DateTime.Format.calendars_for/1
The default is:gregorian
Examples:
iex> Elixir.MyApp.Cldr.DateTime.Format.date_time_formats "en"
{:ok, %Cldr.DateTime.Styles{
full: "{1} 'at' {0}",
long: "{1} 'at' {0}",
medium: "{1}, {0}",
short: "{1}, {0}"
}}
iex> Elixir.MyApp.Cldr.DateTime.Format.date_time_formats "en", :buddhist
{:ok, %Cldr.DateTime.Styles{
full: "{1} 'at' {0}",
long: "{1} 'at' {0}",
medium: "{1}, {0}",
short: "{1}, {0}"
}}