lua-calendrica

# Module `calendrica-astronomical-lunar`

Astronomical lunar calendar conversions (Babylonian, Observational Islamic/Hebrew, Samaritan).

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

fixed_from_babylonian (b_date) | Fixed date equivalent to Babylonian date `b_date`.
babylonian_from_fixed (date) | Babylonian date {year, month, leap, day} corresponding to fixed `date`.
fixed_from_observational_islamic (i_date) | Fixed date equivalent to Observational Islamic date `i_date`.
observational_islamic_from_fixed (date) | Observational Islamic date {year, month, day} corresponding to fixed `date`.
fixed_from_saudi_islamic (s_date) | Fixed date equivalent to Saudi Islamic date `s_date`.
saudi_islamic_from_fixed (date) | Saudi Islamic date {year, month, day} corresponding to fixed `date`.
fixed_from_turkish_islamic (i_date) | Fixed date equivalent to Turkish Islamic date `i_date`.
turkish_islamic_from_fixed (date) | Turkish Islamic date {year, month, day} corresponding to fixed `date`.
fixed_from_astronomical_islamic_umalqura (i_date) | Fixed date equivalent to astronomical Umm al-Qura date `i_date`.
astronomical_islamic_umalqura_from_fixed (date) | Astronomical Umm al-Qura date {year, month, day} corresponding to fixed `date`.
astronomical_easter (g_year) | Date of (proposed) astronomical Easter in Gregorian year `g_year`.
fixed_from_observational_hebrew (h_date) | Fixed date equivalent to Observational Hebrew date `h_date`.
observational_hebrew_from_fixed (date) | Observational Hebrew date {year, month, day} corresponding to fixed `date`.
samaritan_from_fixed (date) | Samaritan date {year, month, day} corresponding to fixed `date`.
fixed_from_samaritan (s_date) | Fixed date of Samaritan date `s_date`.
babylonian_leap_year (b_year) | True if Babylonian year `b_year` is a leap year.
phasis_on_or_before (date, location) | Closest fixed date on or before `date` when crescent moon first became visible at `location`.
phasis_on_or_after (date, location) | Closest fixed date on or after `date` when crescent moon first became visible at `location`.
shaukat_criterion (date, location) | True if crescent moon is likely visible on the eve of `date` at `location` (Shaukat criterion).
yallop_criterion (date, location) | True if crescent moon is possibly visible on the eve of `date` at `location` (Yallop criterion).

## Functions

fixed_from_babylonian (b_date)
  Fixed date equivalent to Babylonian date `b_date`.

  ### Parameters:

  - b_date table Babylonian date {year, month, leap, day}.

  ### Returns:

  number Fixed date.
babylonian_from_fixed (date)
  Babylonian date {year, month, leap, day} corresponding to fixed `date`.

  ### Parameters:

  - date number Fixed date.

  ### Returns:

  table {year, month, leap, day}
fixed_from_observational_islamic (i_date)
  Fixed date equivalent to Observational Islamic date `i_date`.

  ### Parameters:

  - i_date table Islamic date {year, month, day}.

  ### Returns:

  number Fixed date.
observational_islamic_from_fixed (date)
  Observational Islamic date {year, month, day} corresponding to fixed `date`.

  ### Parameters:

  - date number Fixed date.

  ### Returns:

  table {year, month, day}
fixed_from_saudi_islamic (s_date)
  Fixed date equivalent to Saudi Islamic date `s_date`.

  ### Parameters:

  - s_date table Islamic date {year, month, day}.

  ### Returns:

  number Fixed date.
saudi_islamic_from_fixed (date)
  Saudi Islamic date {year, month, day} corresponding to fixed `date`.

  ### Parameters:

  - date number Fixed date.

  ### Returns:

  table {year, month, day}
fixed_from_turkish_islamic (i_date)
  Fixed date equivalent to Turkish Islamic date `i_date`.

  ### Parameters:

  - i_date table Islamic date {year, month, day}.

  ### Returns:

  number Fixed date.
turkish_islamic_from_fixed (date)
  Turkish Islamic date {year, month, day} corresponding to fixed `date`.

  ### Parameters:

  - date number Fixed date.

  ### Returns:

  table {year, month, day}
fixed_from_astronomical_islamic_umalqura (i_date)
  Fixed date equivalent to astronomical Umm al-Qura date `i_date`.

  ### Parameters:

  - i_date table Islamic date {year, month, day}.

  ### Returns:

  number Fixed date.
astronomical_islamic_umalqura_from_fixed (date)
  Astronomical Umm al-Qura date {year, month, day} corresponding to fixed `date`.

  ### Parameters:

  - date number Fixed date.

  ### Returns:

  table {year, month, day}
astronomical_easter (g_year)
  Date of (proposed) astronomical Easter in Gregorian year `g_year`.

  ### Parameters:

  - g_year number Gregorian year.

  ### Returns:

  number Fixed date.
fixed_from_observational_hebrew (h_date)
  Fixed date equivalent to Observational Hebrew date `h_date`.

  ### Parameters:

  - h_date table Hebrew date {year, month, day}.

  ### Returns:

  number Fixed date.
observational_hebrew_from_fixed (date)
  Observational Hebrew date {year, month, day} corresponding to fixed `date`.

  ### Parameters:

  - date number Fixed date.

  ### Returns:

  table {year, month, day}
samaritan_from_fixed (date)
  Samaritan date {year, month, day} corresponding to fixed `date`.

  ### Parameters:

  - date number Fixed date.

  ### Returns:

  table {year, month, day}
fixed_from_samaritan (s_date)
  Fixed date of Samaritan date `s_date`.

  ### Parameters:

  - s_date table Samaritan date {year, month, day}.

  ### Returns:

  number Fixed date.
babylonian_leap_year (b_year)
  True if Babylonian year `b_year` is a leap year.

  ### Parameters:

  - b_year number Babylonian year.

  ### Returns:

  boolean
phasis_on_or_before (date, location)
  Closest fixed date on or before `date` when crescent moon first became visible at `location`.

  ### Parameters:

  - date number Fixed date.
  - location table Location table.

  ### Returns:

  number Fixed date.
phasis_on_or_after (date, location)
  Closest fixed date on or after `date` when crescent moon first became visible at `location`.

  ### Parameters:

  - date number Fixed date.
  - location table Location table.

  ### Returns:

  number Fixed date.
shaukat_criterion (date, location)
  True if crescent moon is likely visible on the eve of `date` at `location` (Shaukat criterion).

  ### Parameters:

  - date number Fixed date.
  - location table Location table.

  ### Returns:

  boolean
yallop_criterion (date, location)
  True if crescent moon is possibly visible on the eve of `date` at `location` (Yallop criterion).

  ### Parameters:

  - date number Fixed date.
  - location table Location table.

  ### Returns:

  boolean

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