Cldr.DateTime.Format.interval_formats
You're seeing just the function
interval_formats
, go back to Cldr.DateTime.Format module for more information.
Link to this function
interval_formats(locale \\ Cldr.get_locale(), calendar \\ Cldr.Calendar.default_cldr_calendar(), backend \\ Cldr.Date.default_backend())
View SourceSpecs
interval_formats( Cldr.Locale.locale_name() | Cldr.LanguageTag.t(), Cldr.Calendar.calendar(), Cldr.backend() ) :: {:ok, map()} | {:error, {atom(), String.t()}}
Returns a map of the interval 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:
Cldr.DateTime.Format.interval_formats "en", :gregorian, MyApp.Cldr
=> {:ok,
%{
bh: %{b: ["h B", "h B"], h: ["h", "h B"]},
bhm: %{b: ["h:mm B", "h:mm B"], h: ["h:mm", "h:mm B"], m: ["h:mm", "h:mm B"]},
d: %{d: ["d", "d"]},
gy: %{g: ["y G", "y G"], y: ["y", "y G"]},
...