NaiveDateTime.convert-exclamation-mark
You're seeing just the function
convert-exclamation-mark
, go back to NaiveDateTime module for more information.
Specs
convert!(Calendar.naive_datetime(), Calendar.calendar()) :: t()
Converts the given naive_datetime
from one calendar to another.
If it is not possible to convert unambiguously between the calendars
(see Calendar.compatible_calendars?/2
), an ArgumentError is raised.
Examples
Imagine someone implements Calendar.Holocene
, a calendar based on the
Gregorian calendar that adds exactly 10,000 years to the current Gregorian
year:
iex> NaiveDateTime.convert!(~N[2000-01-01 13:30:15], Calendar.Holocene)
%NaiveDateTime{calendar: Calendar.Holocene, year: 12000, month: 1, day: 1,
hour: 13, minute: 30, second: 15, microsecond: {0, 0}}