Cldr Calendars Format v0.4.0 Cldr.Calendar.Format View Source
Formatting functions for calendars
Link to this section Summary
Link to this section Functions
Link to this function
month(year, month, options \\ [])
View Sourcemonth( Calendar.year(), Calendar.month(), Cldr.Calendar.Formatter.Options.t() | Keyword.t() ) :: any()
Format one calendar year and month
Arguments
year
is the year of the calendar to be formattedmonth
is the month of the calendar to be formattedoptions
is aCldr.Calendar.Formatter.Options
struct or aKeyword.t
list of options.
Returns
- The result of the
format_month/4
callback of the configured formatter
Examples
=> Cldr.Calendar.Format.month(2019, 4)
=> Cldr.Calendar.Format.month(2019, 4, formatter: Cldr.Calendar.Formatter.HTML.Basic)
=> Cldr.Calendar.Format.month(2019, 4, formatter: Cldr.Calendar.Formatter.Markdown, locale: "fr"
Link to this function
year(year, options \\ [])
View Sourceyear(Calendar.year(), Cldr.Calendar.Formatter.Options.t() | Keyword.t()) :: any()
Format one calendar year
Arguments
year
is the year of the calendar to be formattedoptions
is aCldr.Calendar.Formatter.Options
struct or aKeyword.t
list of options.
Returns
- The result of the
format_year/3
callback of the configured formatter
Examples
=> Cldr.Calendar.Format.year(2019)
=> Cldr.Calendar.Format.year(2019, formatter: Cldr.Calendar.Formatter.Markdown)
=> Cldr.Calendar.Format.year(2019, formatter: Cldr.Calendar.Formatter.Markdown, locale: "fr"