Cldr.DateTime.Format.date_time_formats
You're seeing just the function
date_time_formats
, go back to Cldr.DateTime.Format module for more information.
Link to this function
date_time_formats(locale \\ Cldr.get_locale(), calendar \\ Cldr.Calendar.default_cldr_calendar(), backend \\ Cldr.Date.default_backend())
View SourceSpecs
date_time_formats( Cldr.Locale.locale_name() | Cldr.LanguageTag.t(), Cldr.Calendar.calendar(), Cldr.backend() ) :: {:ok, map()} | {:error, {atom(), 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> 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> Cldr.DateTime.Format.date_time_formats "en", :buddhist, MyApp.Cldr
{:ok, %Cldr.DateTime.Styles{
full: "{1} 'at' {0}",
long: "{1} 'at' {0}",
medium: "{1}, {0}",
short: "{1}, {0}"
}}