# Calendrical v0.3.1 - Table of Contents

Localized month- and week-based calendars and calendar functions
based upon CLDR data via Localize.

## Pages

- [Calendrical](readme.md)
- [License](license.md)
- [Changelog](changelog.md)

- Guides
  - [User-defined Calendars](calendar_behaviour.md)
  - [Available Calendars](calendar_summary.md)
  - [Migrating from ex_cldr_calendars](migration.md)

## Modules

- [Calendrical](Calendrical.md): Calendar functions for calendars compatible with
Elixir's `Calendar` behaviour.
- [Calendrical.Gettext](Calendrical.Gettext.md): Gettext backend for the Calendrical library.

- Gregorian Month-based Calendars
  - [Calendrical.Buddhist](Calendrical.Buddhist.md): Implementation of the Thai Buddhist (Buddhist Era) calendar.
  - [Calendrical.Gregorian](Calendrical.Gregorian.md): Implements the proleptic Gregorian calendar.
  - [Calendrical.Indian](Calendrical.Indian.md): Implementation of the Indian National (Saka) calendar.
  - [Calendrical.Japanese](Calendrical.Japanese.md): Implements the Japanese calendar that is calendrically
the same as the proleptic Gregorian calendar but has a
different era structure.
  - [Calendrical.Roc](Calendrical.Roc.md): Implementation of the Republic of China (Minguo) calendar.

- Gregorian Week-based Calendars
  - [Calendrical.ISOWeek](Calendrical.ISOWeek.md): Implements the ISO Week calendar.
  - [Calendrical.NRF](Calendrical.NRF.md): Implements the US National Retail Federation
(NRF) calendar.

- Julian Calendars
  - [Calendrical.Julian](Calendrical.Julian.md)
  - [Calendrical.Julian.Dec25](Calendrical.Julian.Dec25.md)
  - [Calendrical.Julian.Jan1](Calendrical.Julian.Jan1.md)
  - [Calendrical.Julian.March1](Calendrical.Julian.March1.md)
  - [Calendrical.Julian.March25](Calendrical.Julian.March25.md)
  - [Calendrical.Julian.Sept1](Calendrical.Julian.Sept1.md)

- Lunisolar Calendars
  - [Calendrical.Chinese](Calendrical.Chinese.md): Implementation of the Chinese lunisolar calendar.
  - [Calendrical.Hebrew](Calendrical.Hebrew.md): Implementation of the Hebrew (Jewish) calendar.
  - [Calendrical.Korean](Calendrical.Korean.md): Implementation of the Korean lunisolar calendar.
  - [Calendrical.LunarJapanese](Calendrical.LunarJapanese.md): Implementation of the Japanese lunisolar calendar.
  - [Calendrical.Lunisolar](Calendrical.Lunisolar.md): Shared base implementation for Calendrical's lunisolar calendars.

- Ethiopic Calendars
  - [Calendrical.Ethiopic](Calendrical.Ethiopic.md): Implementation of the Ethiopic calendar.
  - [Calendrical.Ethiopic.AmeteAlem](Calendrical.Ethiopic.AmeteAlem.md): Implementation of the Ethiopic calendar with the *Amete Alem* (Era
of the World, *Anno Mundi*) year numbering.

- Islamic Calendars
  - [Calendrical.Islamic.Civil](Calendrical.Islamic.Civil.md): Implementation of the tabular Islamic (Hijri) civil calendar.
  - [Calendrical.Islamic.Observational](Calendrical.Islamic.Observational.md): Implementation of the *observational* (sighting-based) Islamic
calendar.
  - [Calendrical.Islamic.Rgsa](Calendrical.Islamic.Rgsa.md): Implementation of the *Saudi Arabian sighting-based* Islamic
calendar (CLDR `:islamic_rgsa`).
  - [Calendrical.Islamic.Tbla](Calendrical.Islamic.Tbla.md): Implementation of the tabular Islamic (Hijri) calendar based on the
*astronomical* epoch.
  - [Calendrical.Islamic.UmmAlQura](Calendrical.Islamic.UmmAlQura.md): Implementation of the Saudi Arabian Umm al-Qura calendar.
  - [Calendrical.Islamic.UmmAlQura.Astronomical](Calendrical.Islamic.UmmAlQura.Astronomical.md): Implements the Umm al-Qura calendar for determining the first day of each
Hijri month using the astronomical rules documented by R. H. van Gent.
  - [Calendrical.Islamic.UmmAlQura.ReferenceData](Calendrical.Islamic.UmmAlQura.ReferenceData.md): Official Umm al-Qura first-day dates sourced from the dataset maintained by
R.H. van Gent (Utrecht University) and cross-referenced against the KACST
published tables.

- Ecclesiastical Calendars
  - [Calendrical.Ecclesiastical](Calendrical.Ecclesiastical.md): Computes the dates of Christian ecclesiastical events for a given
Gregorian year.

- Other Calendars
  - [Calendrical.Composite](Calendrical.Composite.md): A composite calendar uses one base calendar before a specified
transition date and a different calendar after, optionally chaining
multiple transitions to model a sequence of historical calendar
reforms.
  - [Calendrical.Coptic](Calendrical.Coptic.md): Implementation of the Coptic calendar.
  - [Calendrical.Persian](Calendrical.Persian.md): The present Iranian calendar was legally adopted on 31
March 1925, under the early Pahlavi dynasty. The law
said that the first day of the year should be the
first day of spring in "the true solar year", "as it
has been" ever so. It also fixes the number of days
in each month, which previously varied by year with
the sidereal zodiac.

- Fiscal-year Calendars
  - [Calendrical.FiscalYear](Calendrical.FiscalYear.md): Pre-built fiscal-year calendars for ISO 3166 territories.

- Behaviours
  - [Calendrical.Behaviour](Calendrical.Behaviour.md): Provides default implementations of the `Calendar` and `Calendrical`
callbacks for algorithmic calendars.
  - [Calendrical.Formatter](Calendrical.Formatter.md): Calendar formatter behaviour.

- Formatting
  - [Calendrical.Format](Calendrical.Format.md): Renders Calendrical calendars as years, months, weeks, and days using a
pluggable formatter.

- Intervals
  - [Calendrical.Interval](Calendrical.Interval.md): Constructs and compares date intervals for any Calendrical calendar.

- K-day Calculations
  - [Calendrical.Kday](Calendrical.Kday.md): Provide K-Day functions for Dates, DateTimes and NaiveDateTimes.

- Preference
  - [Calendrical.Preference](Calendrical.Preference.md): Resolves the preferred Calendrical calendar module for a CLDR locale or an
ISO 3166 territory.

- Eras
  - [Calendrical.Era](Calendrical.Era.md): Encapsulates the era information for
known CLDR calendars.
  - [Calendrical.Era.Buddhist](Calendrical.Era.Buddhist.md): Implements a `year_of_era/{1, 2}` function to return
the year of era and the era number for the
`Calendrical.Era.Buddhist` calendar.
  - [Calendrical.Era.Chinese](Calendrical.Era.Chinese.md): Implements a `year_of_era/{1, 2}` function to return
the year of era and the era number for the
`Calendrical.Era.Chinese` calendar.
  - [Calendrical.Era.Coptic](Calendrical.Era.Coptic.md): Implements a `year_of_era/{1, 2}` function to return
the year of era and the era number for the
`Calendrical.Era.Coptic` calendar.
  - [Calendrical.Era.Dangi](Calendrical.Era.Dangi.md): Implements a `year_of_era/{1, 2}` function to return
the year of era and the era number for the
`Calendrical.Era.Dangi` calendar.
  - [Calendrical.Era.Ethiopic](Calendrical.Era.Ethiopic.md): Implements a `year_of_era/{1, 2}` function to return
the year of era and the era number for the
`Calendrical.Era.Ethiopic` calendar.
  - [Calendrical.Era.Ethiopic_amete_alem](Calendrical.Era.Ethiopic_amete_alem.md): Implements a `year_of_era/{1, 2}` function to return
the year of era and the era number for the
`Calendrical.Era.Ethiopic_amete_alem` calendar.
  - [Calendrical.Era.Hebrew](Calendrical.Era.Hebrew.md): Implements a `year_of_era/{1, 2}` function to return
the year of era and the era number for the
`Calendrical.Era.Hebrew` calendar.
  - [Calendrical.Era.Indian](Calendrical.Era.Indian.md): Implements a `year_of_era/{1, 2}` function to return
the year of era and the era number for the
`Calendrical.Era.Indian` calendar.
  - [Calendrical.Era.Islamic](Calendrical.Era.Islamic.md): Implements a `year_of_era/{1, 2}` function to return
the year of era and the era number for the
`Calendrical.Era.Islamic` calendar.
  - [Calendrical.Era.Islamic_civil](Calendrical.Era.Islamic_civil.md): Implements a `year_of_era/{1, 2}` function to return
the year of era and the era number for the
`Calendrical.Era.Islamic_civil` calendar.
  - [Calendrical.Era.Islamic_rgsa](Calendrical.Era.Islamic_rgsa.md): Implements a `year_of_era/{1, 2}` function to return
the year of era and the era number for the
`Calendrical.Era.Islamic_rgsa` calendar.
  - [Calendrical.Era.Islamic_tbla](Calendrical.Era.Islamic_tbla.md): Implements a `year_of_era/{1, 2}` function to return
the year of era and the era number for the
`Calendrical.Era.Islamic_tbla` calendar.
  - [Calendrical.Era.Islamic_umalqura](Calendrical.Era.Islamic_umalqura.md): Implements a `year_of_era/{1, 2}` function to return
the year of era and the era number for the
`Calendrical.Era.Islamic_umalqura` calendar.
  - [Calendrical.Era.Japanese](Calendrical.Era.Japanese.md): Implements a `year_of_era/{1, 2}` function to return
the year of era and the era number for the
`Calendrical.Era.Japanese` calendar.
  - [Calendrical.Era.Persian](Calendrical.Era.Persian.md): Implements a `year_of_era/{1, 2}` function to return
the year of era and the era number for the
`Calendrical.Era.Persian` calendar.
  - [Calendrical.Era.Roc](Calendrical.Era.Roc.md): Implements a `year_of_era/{1, 2}` function to return
the year of era and the era number for the
`Calendrical.Era.Roc` calendar.

- Exceptions
  - [Calendrical.Formatter.InvalidDateError](Calendrical.Formatter.InvalidDateError.md): Exception raised when a value supplied to a calendar formatter
is not a recognised date.
  - [Calendrical.Formatter.InvalidOptionError](Calendrical.Formatter.InvalidOptionError.md): Exception raised when an unknown option, or an option with an
invalid value, is supplied to a calendar formatter.
  - [Calendrical.Formatter.UnknownFormatterError](Calendrical.Formatter.UnknownFormatterError.md): Exception raised when a calendar formatter module cannot be
resolved.
  - [Calendrical.IncompatibleCalendarError](Calendrical.IncompatibleCalendarError.md): Exception raised when an operation is attempted between two
dates or datetimes that use incompatible calendars.
  - [Calendrical.IncompatibleTimeZoneError](Calendrical.IncompatibleTimeZoneError.md): Exception raised when two datetimes that should be in the same
time zone are not.
  - [Calendrical.InvalidCalendarModuleError](Calendrical.InvalidCalendarModuleError.md): Exception raised when a module is referenced as a calendar but
does not implement the `Calendar` (and `Calendrical`) behaviour.
  - [Calendrical.InvalidDateOrderError](Calendrical.InvalidDateOrderError.md): Exception raised when two dates or times are not ordered from
earlier to later as required by the function being called.
  - [Calendrical.InvalidFormatError](Calendrical.InvalidFormatError.md): Exception raised when an unknown date format width is supplied
to a localization function.
  - [Calendrical.InvalidPartError](Calendrical.InvalidPartError.md): Exception raised when an unknown date part is supplied to a
localization function.
  - [Calendrical.InvalidTypeError](Calendrical.InvalidTypeError.md): Exception raised when an unknown date format type is supplied
to a localization function.
  - [Calendrical.IslamicYearOutOfRangeError](Calendrical.IslamicYearOutOfRangeError.md): Exception raised when an operation on the Umm al-Qura Islamic calendar
references a Hijri year that lies outside the embedded reference data.
  - [Calendrical.MissingFieldsError](Calendrical.MissingFieldsError.md): Exception raised when a date or datetime does not have all
the fields required by the function being called.

