Cldr Calendars Format v0.1.0 Cldr.Calendar.Formatter.Options View Source
Defines and validates the options for a calendar formatter.
These options are passed to the formatter
callbacks defined in Cldr.Calendar.Formatter
.
The valid options are:
:calendar
is an calendar module defined withuse Cldr.Calendar
.:backend
is any module that applieduse Cldr
. The default isCldr.default_backend()
.:formatter
is any module implementing theCldr.Calendar.Formatter
behaviour.:locale
is any locale returned byCldr.validate_locale/1
. The default isCldr.get_locale()
.:number_system
is any valid number system for the given locale. Available number systems for a locale are returned byCldr.Number.System.number_systems_for(locale, backend)
. The default is:default
.:territory
is any territory returned byCldr.validate_territory/1
The default is the territory defined in thelocale
struct.:caption
is a caption to be applied in any way defined by the:formatter
. The default isnil
.:class
is a class name that can be used any way defined by the:formatter
. It is most commonly used to apply an HTML class to an enclosing tag.:id
is an id that can be used any way defined by the:formatter
. It is most commonly used to apply an HTML id to an enclosing tag.:today
is anyDate.t
that represents today. It is commonly used to allow a formatting to appropriately format a date that is today differently to other days on a calendar.:day_names
is a list of 2-tuples that map the day of the week to a localised day name that are most often used as headers for a month. The default is automatically calculated from the provided:calendar
and:locale
.
Link to this section Summary
Link to this section Types
t()
View Source
t() :: %Cldr.Calendar.Formatter.Options{
backend: module(),
calendar: module(),
caption: String.t() | nil,
class: String.t() | nil,
day_names: [{1..7, String.t()}],
formatter: module(),
id: String.t() | nil,
locale: Cldr.LanguageTag.t(),
number_system: Cldr.Number.System.system_name(),
territory: atom() | String.t(),
today: Date.t()
}
t() :: %Cldr.Calendar.Formatter.Options{ backend: module(), calendar: module(), caption: String.t() | nil, class: String.t() | nil, day_names: [{1..7, String.t()}], formatter: module(), id: String.t() | nil, locale: Cldr.LanguageTag.t(), number_system: Cldr.Number.System.system_name(), territory: atom() | String.t(), today: Date.t() }
Formatter options