Cldr.Calendar.Sigils (Cldr Calendars v2.3.0)
View SourceImplements the ~d sigils to produce
dates, datetimes and naive datetimes.
Summary
Functions
Implements a ~d sigil for expressing dates.
Dates can be expressed in the following formats:
~d[yyyy-mm-dd]which produces a date in theCldr.Calendar.Gregoriancalendar~d[yyyy-Wmm-dd]which produces a date in theCldr.Calendar.ISOWeekcalendar~d[yyyy-mm-dd calendar]which produces a date in the given month-based calendar~d[yyyy-Wmm-dd calendar]which produces a date in the given week-based calendar~d[yyyy-mm-dd C.E Julian]which produces a date in the Cldr.Calendar.Julian calendar~d[yyyy-mm-dd B.C.E Julian]which produces a date in the Cldr.Calendar.Julian calendar
Examples
iex> import Cldr.Calendar.Sigils
iex> ~d[2019-01-01 Gregorian]
~d[2019-01-01 Gregorian]
iex> ~d[2019-W01-01]
~d[2019-W01-1 ISOWeek]