Cldr.Calendar.validate_calendar
You're seeing just the function
validate_calendar
, go back to Cldr.Calendar module for more information.
Validates if the argument is a Cldr.Calendar calendar module.
Arguments
calendar_module
is a module that implements theCldr.Calendar
behaviour
Returns
{:ok, calendar_module}
or{:error, {exception, reason}}
Examples
iex> Cldr.Calendar.validate_calendar Cldr.Calendar.Gregorian
{:ok, Cldr.Calendar.Gregorian}
iex> Cldr.Calendar.validate_calendar :not_a_calendar
{:error,
{Cldr.InvalidCalendarModule, ":not_a_calendar is not a calendar module."}}