Cldr.Calendar.date_from_tuple
You're seeing just the function
date_from_tuple, go back to Cldr.Calendar module for more information.
Returns a Date.t from a date tuple of
{year, month, day} and a calendar.
Arguments
{year, month, day}is a tuple representing a datecalendaris any module implementing theCalendarandCldr.Calendarbehaviours
Returns
- a
Date.t
Examples
iex> Cldr.Calendar.date_from_tuple {2019, 3, 25}, Cldr.Calendar.Gregorian
%Date{calendar: Cldr.Calendar.Gregorian, day: 25, month: 3, year: 2019}
iex> Cldr.Calendar.date_from_tuple {2019, 2, 29}, Cldr.Calendar.Gregorian
{:error, :invalid_date}