Cldr.Calendar.Sigils (Cldr Calendars v1.11.0) View Source
Implements the ~d sigils to produce
dates, datetimes and naive datetimes.
Link to this section Summary
Link to this section 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]