Available Calendars

Copy Markdown

This guide describes every CLDR-aligned calendar that ships with Calendrical, grouped by the underlying mechanism. For each calendar it gives the CLDR identifier, the epoch, the month structure, the leap-year rule, and a worked reference date so you can verify a conversion in iex.

The 17 CLDR-acceptable calendar types are all implemented. Each section below cites the corresponding CLDR identifier and the Calendrical module that exposes it.

The astronomical calendars and the ephemeris

Several calendars are astronomical, computing month and year starts from the positions of the sun and moon via the Astro library, and each answers for its own range of years:

  • The observational Islamic calendars (Observational, Rgsa) and UmmAlQura.Astronomical judge each month's crescent from the JPL ephemeris. Since Astro 2.5 a compact ephemeris covering 1900–2100 ships with the package, so they work immediately after installation; outside it the observational calendars' conversions raise Calendrical.UnsupportedDateRangeError, and UmmAlQura.Astronomical returns {:error, %Calendrical.UnsupportedDateRangeError{}}. Running mix astro.download_ephemeris installs the full 1849–2150 ephemeris and widens their range accordingly.

  • The Persian calendar takes its new year from the ephemeris for Persian years 1279 to 1479 (Gregorian 1900 to 2100) and from ICU's arithmetic 33-year cycle outside them, so it answers for every year.

  • The Chinese, Korean, Lunar Japanese and Vietnamese calendars compute new moons and solar terms from Astro's series rather than the ephemeris, and answer for the 40,001 years counted from their epoch as Gregorian years -20,000 to 20,000, raising Calendrical.UnsupportedDateRangeError beyond them.


Gregorian calendars

These are calendars whose month and day structure is identical to (or derived from) the proleptic Gregorian calendar. They differ only in their week structure or in their year numbering.

Month-based Gregorian calendars

A month-based Gregorian calendar lays out years as 12 months of 28–31 days following the proleptic Gregorian rule. Date arithmetic and the leap-year rule are inherited from Calendar.ISO. They differ from each other only in year numbering and in which month starts the calendar year (for fiscal calendars).

CalendarCLDRYear offsetFirst monthNotes
Calendrical.Gregorian:gregoriannoneJanuaryThe base calendar. Wraps Calendar.ISO and adds CLDR localization.
Calendrical.ISO(n/a)noneJanuaryIdentical to Calendrical.Gregorian but uses the ISO-8601 4-day rule for week-of-year.
Calendrical.Buddhist:buddhist+543JanuaryThai Buddhist Era (BE). 1 BE = -542 proleptic Gregorian (= 543 BCE). 2024 CE = 2567 BE.
Calendrical.Roc:roc-1911JanuaryRepublic of China (Minguo). 1 ROC = 1912 CE. 2024 CE = 113 ROC. Used officially in Taiwan.
Calendrical.Japanese:japanesenoneJanuarySame arithmetic as Calendrical.Gregorian but advertises Japanese era data (Reiwa, Heisei, Shōwa, …) for localization.
Calendrical.NRF(n/a, week)noneJanuaryUS National Retail Federation 4-5-4 retail calendar; the year ends on the Saturday nearest 31 January. Week-based: see below.
Calendrical.FiscalYear.<TERR>(n/a)noneconfigurableFiscal calendars for 50+ territories (US Oct 1 → Sep 30, AU Jul 1 → Jun 30, …), built on first use by Calendrical.FiscalYear.calendar_for/1.

Worked example. Buddhist year 2567:

iex> {:ok, gregorian} = Date.new(2024, 1, 1, Calendrical.Gregorian)
iex> {:ok, buddhist} = Date.convert(gregorian, Calendrical.Buddhist)
iex> buddhist
~D[2567-01-01 Calendrical.Buddhist]

Week-based Gregorian calendars

A week-based Gregorian calendar lays out years as a fixed number of 52 (or 53) seven-day weeks rather than 12 calendar months. Each "month" is a contiguous block of weeks (typically 4 or 5) so that quarters always have an exact number of complete weeks. The two share the same proleptic Gregorian day numbering as the month-based calendars but expose a very different period structure.

CalendarCLDRLayoutYear start rule
Calendrical.ISOWeek:generic52/53 ISO-8601 weeks. Each week starts on Monday.The week containing 4 January (i.e. the first week with at least 4 days in the new Gregorian year).
Calendrical.NRF:generic52/53 weeks in a 4-4-5 / 4-5-4 / 5-4-4 quarter pattern. Each week starts on Sunday.The Sunday closest to 1 February.

A week-based calendar's "months" have no names of their own, so its cldr_calendar_type/0 is :generic and they take the names of CLDR's generic calendar, "M01" to "M12", while its days, quarters and eras keep the Gregorian names. A date of one is a year, a month of its pattern and a day of that month, as a date of any calendar is: the second day of week 25 is ~D[2026-06-16 Calendrical.ISOWeek], and date_to_string/3 writes it "2026-06-16". The week is asked of the date (Calendrical.week_of_year/1, week_date_from_date/3), and parse_date/1 and the ~D sigil read a week date, "2026-W25-2", as the date it names.

The key differences between month- and week-based Gregorian calendars:

AspectMonth-basedWeek-based
Year length365 or 366 daysAlways a multiple of 7 days (364 or 371)
Period unitCalendar month (28–31 days)Logical "month" of 28 or 35 days made up of contiguous weeks
Year numberingSame as Gregorian (with offsets)The year that contains the most weeks
Quarter alignmentQuarters span 90–92 daysQuarters always span exactly 13 weeks
Use caseCivil calendars, holidaysRetail, finance, broadcast, and any domain that needs week-aligned reporting

Both kinds use exactly the same date_to_iso_days/3 and date_from_iso_days/1 arithmetic to map to the proleptic Gregorian day count, so a date in either kind round-trips through Date.convert/2 correctly with all other Calendrical calendars.


Julian calendars

These calendars use the proleptic Julian rule "every fourth year is a leap year" with no centurial exception. They share a single set of date-arithmetic primitives, but differ in the day on which the year begins, and in which January year gives a year its number.

CalendarYear 1100 begins onNotes
Calendrical.Julian1 January 1100Proleptic Julian. The default.
Calendrical.Julian.Jan11 January 1100Same as Calendrical.Julian.
Calendrical.Julian.March11 March 1100The Venetian style (more veneto).
Calendrical.Julian.March2525 March 1100Lady Day, the Annunciation style of England until 1751 and of Florence.
Calendrical.Julian.Sept11 September 1099The Byzantine year.
Calendrical.Julian.Dec2525 December 1099The Nativity style of medieval western Europe.

The number of a year. A year reckoned from 1 March or 25 March begins after 1 January of the same number, so its January and February, and March to the 24th, carry the number of the year before. A year reckoned from 1 September or 25 December begins before it, so its last months carry the number of the year to come: Christmas Day 1099 is the first day of 1100 in Calendrical.Julian.Dec25. C. R. Cheney's A Handbook of Dates sets out the reckonings from Christmas Day, the Annunciation and Venice's 1 March, and a Byzantine year of the world begins on 1 September, four months before the January year that is 5508 less. A variant of your own names its new-year day and the Julian year that numbers it: use Calendrical.Calendar.Shifted, base: Calendrical.Julian, year_begins: {3, 25}, year_number: :ending, written_year: :label is the Pisan reckoning, a year ahead of Florence's.

Counted months. A variant's dates carry counted months: month 1 begins on the new-year day and the months follow in the order of time, so a date's fields order as its days do and Date.compare/2 holds. A variant whose year begins on the first of a Julian month has twelve counted months, each a whole Julian month; one whose year begins within a month (March25, Dec25) has thirteen, the split month's later days as a short month 1 and its earlier days as a short month 13. The Julian month and day that name a date come from cardinal_month/1 and cardinal_day/3, the Julian date itself from each variant's base_date/3, and Calendrical.named_month/3 gives a named month's days in the order of time, in two ranges where it is split.

Leap-year rule (all variants). A Julian year y is a leap year when rem(y, 4) == 0. Note that this is the proleptic rule applied without the Gregorian centurial exception, so 1900 is a Julian leap year.

The historical year-start variants are useful for reading and writing dates from medieval and early-modern documents. They are also the building blocks for Calendrical.Composite (see below) when constructing a calendar that transitioned from Julian to Gregorian on a specific date.

Worked example.

iex> {:ok, julian} = Date.new(2024, 1, 1, Calendrical.Julian)
iex> {:ok, gregorian} = Date.convert(julian, Calendrical.Gregorian)
iex> gregorian
~D[2024-01-14 Calendrical.Gregorian]

Solar, lunar, and lunisolar calendars

The remaining CLDR calendars are not derived from Gregorian or Julian. They are grouped here by their underlying astronomical mechanism.

Solar (non-Gregorian)

A solar calendar tracks the tropical year (the time between successive vernal equinoxes) but does not use the Gregorian/Julian leap-year rule. Each implementation has its own tropical-year approximation and its own month layout.

CalendarCLDRAlgorithmYear length
Calendrical.Persian:persianAstronomical: each Hijri-Shamsi year starts on the Gregorian day on which the vernal equinox occurs in Tehran. Uses Astro.equinox/2.365 or 366 days
Calendrical.Indian:indianAlgorithmic, year-offset over Gregorian. Saka year = Gregorian year − 78, but with custom month names and a distinct month structure (Chaitra–Phalguna).365 or 366 days
Calendrical.Coptic:coptic13-month year (12 × 30 days + Pi Kogi Enavot of 5 or 6 days). Tabular: leap years are rem(year, 4) == 3. Day 1 of year 1 is 29 August 284 CE Julian.365 or 366 days
Calendrical.Ethiopic:ethiopicSame 13-month layout and leap-year rule as Coptic. Era of Mercy starts 29 August 8 CE Julian.365 or 366 days
Calendrical.Ethiopic.AmeteAlem:ethiopic_amete_alemSame algorithm as Calendrical.Ethiopic with a year offset of +5500 (the Era of the World).365 or 366 days

Worked example (Persian).

iex> {:ok, persian} = Date.new(1403, 1, 1, Calendrical.Persian)
iex> {:ok, gregorian} = Date.convert(persian, Calendrical.Gregorian)
iex> gregorian
~D[2024-03-20 Calendrical.Gregorian]

Lunar

A lunar calendar tracks the synodic month (the ~29.5-day cycle of lunar phases) but does not attempt to stay aligned with the tropical year. Twelve lunar months are about 354 days, so a lunar calendar drifts ~11 days per year against the seasons.

The Islamic family is the only CLDR-supported lunar calendar family. All five variants share the same month names (Muharram → Dhuʻl-Hijjah) and year numbering (Anno Hegirae) but differ in how they decide which Gregorian day each lunar month begins on.

Islamic calendars

CalendarCLDRMethodEpochNotes
Calendrical.Islamic.Civil:islamic_civilTabular, civil (Friday) epochFriday 16 July 622 Julian = 19 July 622 proleptic GregorianStandard arithmetic Hijri calendar. 30-year cycle with 11 leap years (Type II Kūshyār: 2, 5, 7, 10, 13, 16, 18, 21, 24, 26, 29).
Calendrical.Islamic.Tbla:islamic_tblaTabular, astronomical (Thursday) epochThursday 15 July 622 Julian = 18 July 622 proleptic GregorianSame algorithm as Civil but the epoch is one day earlier. TBLA = "tabular based on lunar astronomy".
Calendrical.Islamic.UmmAlQura:islamic_umalquraPrecomputed table of KACST's official month lengths1 Muharram 1 AH = 19 July 622The official Saudi civil calendar. The table covers 1 AH–1600 AH (622–2174 CE), KACST's months to 1500 AH and ICU's after; other years are those of Calendrical.Islamic.Civil, as in ICU. From 1300 AH it is ICU's day for day. mix calendrical.umm_al_qura.verify --kacst compares the table with KACST's current data.
Calendrical.Islamic.UmmAlQura.Astronomical(alternative for :islamic_umalqura)Astronomical (sunset/moonset at Mecca) using the Umm al-Qura rules documented by R.H. van Gent(notional)Computes the published rule from astronomy, from 1392 AH to the end of the installed ephemeris. It matches KACST's table through 1450 AH; from 1451 AH KACST's projected months, and ICU's which carry them, begin a third of months a day later, always where the moon sets less than about 20 minutes after the sun, by a criterion KACST has not published. Use UmmAlQura for official dates.
Calendrical.Islamic.Observational:islamicAstronomical (crescent visibility at Cairo) using Astro.new_visible_crescent/3 (Odeh 2006)(notional)The "generic" CLDR :islamic calendar. Implements phasis-on-or-before from Reingold but uses the modern Odeh visibility model rather than Shaukat.
Calendrical.Islamic.Rgsa:islamic_rgsaAstronomical (crescent visibility at Mecca)(notional)The Saudi religious sighting calendar. Same algorithm as Observational but observed at al-Masjid al-Ḥarām. May diverge from UmmAlQura in months where the astronomical prediction does not match the KACST table.

All Islamic calendars share the same 12-month layout:

#NameTabular days
1Muharram30
2Safar29
3Rabiʻ I30
4Rabiʻ II29
5Jumada I30
6Jumada II29
7Rajab30
8Shaʻban29
9Ramadan30
10Shawwal29
11Dhuʻl-Qiʻdah30
12Dhuʻl-Hijjah29 / 30 (leap)

In the other variants a month is 29 or 30 days as its calendar decides it: by predicted crescent visibility in Observational and Rgsa, by the Umm al-Qura rule in UmmAlQura.Astronomical, and by KACST's and ICU's tables in UmmAlQura. The table above describes only Civil and Tbla.

Worked example.

iex> {:ok, gregorian} = Date.new(2025, 3, 1, Calendrical.Gregorian)
iex> {:ok, hijri} = Date.convert(gregorian, Calendrical.Islamic.UmmAlQura)
iex> hijri
~D[1446-09-01 Calendrical.Islamic.UmmAlQura]

iex> Calendrical.localize(hijri, :month, locale: "en", style: :wide)
"Ramadan"

Lunisolar

A lunisolar calendar tracks the synodic month and keeps the year aligned with the tropical year by inserting a leap (or embolismic) month every two or three years. The result is a year of either 12 months (~354 days) or 13 months (~384 days), with month boundaries on the new moon.

CalendarCLDRAlgorithmLeap rule
Calendrical.Hebrew:hebrewArithmetic (Reingold)19-year Metonic cycle: years 3, 6, 8, 11, 14, 17, 19 are leap. Months are numbered by their position in the year from Tishri, so Adar I is month 6 of a leap year; ordinal_month_from_traditional/2 takes the RFC 7529 traditional month.
Calendrical.Chinese:chineseAstronomical (lunar phase + winter solstice at Beijing/China longitude)Inserts a 13th leap month between the new moons that contain no major solar term. Uses the Astro library.
Calendrical.Korean:dangiAstronomical (lunar phase + winter solstice at Seoul longitude)Same algorithm as Calendrical.Chinese but observed from Seoul. The CLDR identifier :dangi refers to the Dangi era starting 2333 BCE.
Calendrical.LunarJapanese:chinese (shared)Astronomical (lunar phase + winter solstice at Japan-standard-time longitude)The historical Japanese lunisolar calendar used until 1873, when Japan switched to the proleptic Gregorian.
Calendrical.Vietnamese:chinese (shared)Astronomical (lunar phase + winter solstice at the Hanoi 105° East meridian)Same algorithm as Calendrical.Chinese, observed from Hanoi (UTC+7) from 1968 and following the Chinese calendar before then. Tết diverges from the Chinese New Year in 1985, 2007, 2030 and 2053.

Year length. All five lunisolar calendars produce year lengths of 353, 354, 355, 383, 384, or 385 days (Hebrew is restricted to these specific lengths by additional dehiyyah postponement rules; the Chinese family permits the full range).

Worked example (Hebrew).

iex> {:ok, hebrew} = Date.new(5784, 1, 1, Calendrical.Hebrew)  # 1 Tishri 5784
iex> {:ok, gregorian} = Date.convert(hebrew, Calendrical.Gregorian)
iex> gregorian
~D[2023-09-16 Calendrical.Gregorian]

iex> {:ok, passover} = Date.new(5784, 8, 15, Calendrical.Hebrew)  # 15 Nisan, month 8 of a leap year
iex> {:ok, gregorian} = Date.convert(passover, Calendrical.Gregorian)
iex> gregorian
~D[2024-04-23 Calendrical.Gregorian]

Composite calendars

A composite calendar uses one base calendar before a specified date and a different calendar afterwards. This is the canonical way to model the historical Julian-to-Gregorian transition for individual countries, where the calendar in use literally changed on a known date and a window of "missing" days appeared in the historical record.

CalendarModuleDescription
User-definedCalendrical.CompositeThe defmacro __using__ template that builds a composite calendar from a list of transition dates.
Pre-builtCalendrical.Reform.SwedenSweden's aborted 1700 reform, its unique 30 February 1712, and the final Julian → Gregorian switch in 1753.
Pre-builtCalendrical.Reform.JapanJapan's 1873 switch from the lunisolar calendar to the Gregorian calendar.
Pre-builtCalendrical.Reform.EnglandEngland's three transitions: 1155 (March 25 year-start), 1751 (January 1 year-start), 1752 (Julian → Gregorian, dropping 11 days).

Worked example (Sweden, 1753 transition).

iex> Date.shift(~D[1753-02-17 Calendrical.Reform.Sweden], day: 1)
~D[1753-03-01 Calendrical.Reform.Sweden]

The 11 "missing" days (18 February 1753 through 28 February 1753) are not valid dates in the Swedish composite calendar — Calendrical.Reform.Sweden.valid_date?(1753, 2, 20) returns false.

See calendar_behaviour.md for the syntax of use Calendrical.Composite.


Ecclesiastical calendars

The Calendrical.Ecclesiastical module is not a calendar in the Calendar behaviour sense — it does not implement date_to_iso_days/3 or valid_date?/3 and is not registered as a CLDR calendar type. Instead, it provides functions that, given a Gregorian year, return the dates of the principal Christian liturgical events for that year. The algorithms are taken from Dershowitz & Reingold, Calendrical Calculations (4th ed.), Chapter 9 ("Ecclesiastical Calendars").

Three Easter traditions

Calendrical exposes three different Easter computations because they really are three distinct calculations. The differences are small in most years (and the three frequently coincide) but the underlying definitions and target audiences are different.

FunctionMethodCalendarUsed by
easter_sunday/1Gregorian computus (tabular)Calendrical.GregorianRoman Catholic, Anglican, most Protestants
astronomical_easter_sunday/1Astronomical Paschal Full Moon + first Sunday afterCalendar.ISO (UTC)"Astronomical Easter" — proposed by the World Council of Churches in 1997, no Church follows it
orthodox_easter_sunday/1Julian computus (tabular)Calendrical.JulianEastern Orthodox

Western Easter and Orthodox Easter coincide in years like 2025; they can differ by one, four, or five weeks in other years because the Western (Gregorian) and Eastern (Julian) computus use different lookup tables and different leap-year rules. The astronomical reckoning agrees with the Western Gregorian computus for most years in the 21st century but is not actually used by any Church — it is included for comparison and research.

Movable feasts (Western)

Western (Roman Catholic, Anglican, most Protestants). All return Calendrical.Gregorian dates.

FunctionReturnsNotes
easter_sunday/1Western Easter SundayGregorian computus.
good_friday/1Western Good FridayTwo days before easter_sunday/1.
pentecost/1Western Pentecost Sunday (Whitsunday)49 days after easter_sunday/1.
advent/1Western Advent SundayThe Sunday closest to 30 November.

Movable feasts (Eastern Orthodox)

All return Calendrical.Julian dates so the calendar context is visible in the result.

FunctionReturnsNotes
orthodox_easter_sunday/1Orthodox Easter SundayJulian computus.
orthodox_good_friday/1Orthodox Good FridayTwo days before orthodox_easter_sunday/1.
orthodox_pentecost/1Orthodox Pentecost Sunday49 days after orthodox_easter_sunday/1.
orthodox_advent/1Start of the Eastern Orthodox Nativity FastFixed at 15 November (Julian) — a 40-day Lenten preparation. The Orthodox tradition does not have a movable "Advent Sunday" equivalent.

Movable feasts (astronomical, WCC 1997)

The World Council of Churches' 1997 Aleppo proposal for unifying Western and Eastern Easter. No Church currently follows it. All return Calendar.ISO dates and are restricted to year range 1000..3000.

FunctionReturnsNotes
astronomical_easter_sunday/1{:ok, Date} for Astronomical EasterFirst Sunday strictly after the astronomical Paschal Full Moon.
astronomical_good_friday/1{:ok, Date} for Astronomical Good FridayTwo days before astronomical_easter_sunday/1.
paschal_full_moon/1{:ok, Date} for the astronomical Paschal Full MoonThe first astronomical full moon on or after the March vernal equinox, computed via Astro.equinox/2 and Astro.date_time_lunar_phase_at_or_after/2. May differ by a day from the ecclesiastical PFM used by the Western or Eastern computus.

Fixed feasts

FunctionReturnsNotes
christmas/1The Gregorian date of Western Christmas DayAlways 25 December.
epiphany/1The Gregorian date of Epiphany (US observance)The first Sunday after 1 January. The traditional fixed-date Epiphany on 6 January is more widely observed elsewhere.
eastern_orthodox_christmas/1A list of zero, one, or two Gregorian dates25 December Julian projected onto the proleptic Gregorian calendar. May fall in either January or December of the requested Gregorian year.
coptic_christmas/1A list of zero, one, or two Gregorian dates29 Koiak in the Coptic calendar projected onto the proleptic Gregorian calendar.

Worked example.

iex> Calendrical.Ecclesiastical.easter_sunday(2024)
~D[2024-03-31 Calendrical.Gregorian]

iex> Calendrical.Ecclesiastical.orthodox_easter_sunday(2024)
~D[2024-04-22 Calendrical.Julian]

# Project onto Gregorian: Orthodox Easter 2024 = May 5 Gregorian
iex> {:ok, gregorian} =
...>   Date.convert(
...>     Calendrical.Ecclesiastical.orthodox_easter_sunday(2024),
...>     Calendrical.Gregorian
...>   )
iex> gregorian
~D[2024-05-05 Calendrical.Gregorian]

iex> Calendrical.Ecclesiastical.pentecost(2025)
~D[2025-06-08 Calendrical.Gregorian]

iex> Calendrical.Ecclesiastical.orthodox_pentecost(2025)
~D[2025-05-26 Calendrical.Julian]

iex> Calendrical.Ecclesiastical.advent(2025)
~D[2025-11-30 Calendrical.Gregorian]

iex> Calendrical.Ecclesiastical.orthodox_advent(2025)
~D[2025-11-15 Calendrical.Julian]