Cldr.validate_calendar
You're seeing just the function
validate_calendar
, go back to Cldr module for more information.
Specs
Normalise and validate a calendar name.
Arguments
calendar
is any calendar name returned byCldr.known_calendars/0
Returns
{:ok, normalized_calendar_name}
or{:error, {Cldr.UnknownCalendarError, message}}
Examples
iex> Cldr.validate_calendar(:gregorian)
{:ok, :gregorian}
iex> Cldr.validate_calendar(:invalid)
{:error, {Cldr.UnknownCalendarError, "The calendar name :invalid is invalid"}}