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

default_calendar_css_class()

View Source
Link to this function

default_formatter_module()

View Source
Link to this function

formatter_module?(formatter)

View Source
Link to this function

invalid_date_error(date)

View Source
Link to this function

invalid_formatter_error(formatter)

View Source

Format one calendar year and month

Arguments

  • year is the year of the calendar to be formatted

  • month is the month of the calendar to be formatted

  • options is a Cldr.Calendar.Formatter.Options struct or a Keyword.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"

Format one calendar year

Arguments

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"