Cldr.Calendar.Format (Cldr Calendars Format v1.0.0)
View SourceFormatting functions for calendars
Summary
Functions
@spec month( 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"
@spec year(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"