Cldr.DateTime.Format.time_formats
You're seeing just the function
time_formats
, go back to Cldr.DateTime.Format module for more information.
Link to this function
time_formats(locale \\ Cldr.get_locale(), calendar \\ Cldr.Calendar.default_cldr_calendar(), backend \\ Cldr.Date.default_backend())
View SourceSpecs
time_formats( Cldr.Locale.locale_name() | Cldr.LanguageTag, Cldr.Calendar.calendar(), Cldr.backend() ) :: {:ok, standard_formats()} | {:error, {atom(), String.t()}}
Returns a map of the standard time 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.time_formats "en"
{:ok, %Cldr.Time.Styles{
full: "h:mm:ss a zzzz",
long: "h:mm:ss a z",
medium: "h:mm:ss a",
short: "h:mm a"
}}
iex> Cldr.DateTime.Format.time_formats "en", :buddhist
{:ok, %Cldr.Time.Styles{
full: "h:mm:ss a zzzz",
long: "h:mm:ss a z",
medium: "h:mm:ss a",
short: "h:mm a"
}}