Module calendrica-bahai

Baha'i calendar conversions (arithmetic and astronomical).

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

Functions

fixed_from_bahai (b_date) Fixed date equivalent to the Baha'i date `b_date`.
bahai_from_fixed (date) Baha'i date {major, cycle, year, month, day} corresponding to fixed `date`.
bahai_new_year (g_year) Fixed date of arithmetic Bahá'í New Year (always March 21) in Gregorian year `g_year`.
fixed_from_astro_bahai (b_date) Fixed date of astronomical Baha'i date `b_date`.
astro_bahai_from_fixed (date) Astronomical Baha'i date {major,cycle,year,month,day} corresponding to fixed `date`.
naw_ruz (g_year) Fixed date of Bahá'í New Year (Naw-Rúz) in Gregorian year `g_year`.
feast_of_ridvan (g_year) Fixed date of the Feast of Riḍván in Gregorian year `g_year`.
birth_of_the_bab (g_year) Fixed date of the Birthday of the Báb in Gregorian year `g_year`.

Fields

AYYAM_I_HA Intercalary month number (0) inserted before the last month of the year.


Functions

fixed_from_bahai (b_date)
Fixed date equivalent to the Baha'i date `b_date`.

Parameters:

  • b_date table Baha'i date {major, cycle, year, month, day}.

Returns:

    number Fixed date.
bahai_from_fixed (date)
Baha'i date {major, cycle, year, month, day} corresponding to fixed `date`.

Parameters:

  • date number Fixed date.

Returns:

    table {major, cycle, year, month, day}
bahai_new_year (g_year)
Fixed date of arithmetic Bahá'í New Year (always March 21) in Gregorian year `g_year`. For the astronomical version based on the vernal equinox, use `naw_ruz`.

Parameters:

  • g_year number Gregorian year.

Returns:

    number Fixed date.
fixed_from_astro_bahai (b_date)
Fixed date of astronomical Baha'i date `b_date`.

Parameters:

  • b_date table Baha'i date {major, cycle, year, month, day}.

Returns:

    number Fixed date.
astro_bahai_from_fixed (date)
Astronomical Baha'i date {major,cycle,year,month,day} corresponding to fixed `date`.

Parameters:

  • date number Fixed date.

Returns:

    table {major, cycle, year, month, day}
naw_ruz (g_year)
Fixed date of Bahá'í New Year (Naw-Rúz) in Gregorian year `g_year`.

Parameters:

  • g_year number Gregorian year.

Returns:

    number Fixed date.
feast_of_ridvan (g_year)
Fixed date of the Feast of Riḍván in Gregorian year `g_year`.

Parameters:

  • g_year number Gregorian year.

Returns:

    number Fixed date.
birth_of_the_bab (g_year)
Fixed date of the Birthday of the Báb in Gregorian year `g_year`.

Parameters:

  • g_year number Gregorian year.

Returns:

    number Fixed date.

Fields

AYYAM_I_HA
Intercalary month number (0) inserted before the last month of the year.
generated by LDoc 1.5.0 Last updated 2026-06-18 11:45:28