lua-calendrica

# Module `calendrica-coptic-ethiopic`

Coptic and Ethiopic calendar conversions.

Ported from "Calendrical Calculations" (4th edition) by Nachum Dershowitz and Edward M. Reingold. Original Lisp code (CALENDRICA 4.0) is Apache 2.0 licensed.

### Info:

- Release: 0.1 2026-07-19

## Functions

coptic_leap_year (c_year) | True if `c_year` is a Coptic leap year.
fixed_from_coptic (c_date) | Fixed date of Coptic date `c_date`.
coptic_from_fixed (date) | Coptic date {year, month, day} equivalent to fixed `date`.
fixed_from_ethiopic (e_date) | Fixed date of Ethiopic date `e_date`.
ethiopic_from_fixed (date) | Ethiopic date {year, month, day} equivalent to fixed `date`.
coptic_in_gregorian (c_month, c_day, g_year) | Fixed dates of Coptic month `c_month`, day `c_day` that fall in Gregorian year `g_year`.
coptic_christmas (g_year) | Fixed dates of Coptic Christmas (Coptic month 4, day 29) in Gregorian year `g_year`.

## Functions

coptic_leap_year (c_year)
  True if `c_year` is a Coptic leap year.

  ### Parameters:

  - c_year number Coptic year.

  ### Returns:

  boolean
fixed_from_coptic (c_date)
  Fixed date of Coptic date `c_date`.

  ### Parameters:

  - c_date table Coptic date {year, month, day}.

  ### Returns:

  number Fixed date.
coptic_from_fixed (date)
  Coptic date {year, month, day} equivalent to fixed `date`.

  ### Parameters:

  - date number Fixed date.

  ### Returns:

  table {year, month, day}
fixed_from_ethiopic (e_date)
  Fixed date of Ethiopic date `e_date`. Same structure as the Coptic calendar with a different epoch.

  ### Parameters:

  - e_date table Ethiopic date {year, month, day}.

  ### Returns:

  number Fixed date.
ethiopic_from_fixed (date)
  Ethiopic date {year, month, day} equivalent to fixed `date`.

  ### Parameters:

  - date number Fixed date.

  ### Returns:

  table {year, month, day}
coptic_in_gregorian (c_month, c_day, g_year)
  Fixed dates of Coptic month `c_month`, day `c_day` that fall in Gregorian year `g_year`.

  ### Parameters:

  - c_month number Coptic month.
  - c_day number Coptic day.
  - g_year number Gregorian year.

  ### Returns:

  table List of fixed dates (0 or 1 entries).
coptic_christmas (g_year)
  Fixed dates of Coptic Christmas (Coptic month 4, day 29) in Gregorian year `g_year`.

  ### Parameters:

  - g_year number Gregorian year.

  ### Returns:

  {number,...} Fixed dates of Coptic Christmas in the year.

generated by LDoc 1.5.0 Last updated 2026-07-19 03:28:25