lua-calendrica

# Module `calendrica-persian`

Persian calendar conversions (astronomical and arithmetic).

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_persian (p_date) | Fixed date of Astronomical Persian date `p_date`.
persian_from_fixed (date) | Astronomical Persian date {year, month, day} corresponding to fixed `date`.
fixed_from_arithmetic_persian (p_date) | Fixed date equivalent to arithmetic Persian date `p_date`.
arithmetic_persian_from_fixed (date) | Arithmetic Persian date {year, month, day} corresponding to fixed `date`.
arithmetic_persian_leap_year (p_year) | True if arithmetic Persian year `p_year` is a leap year.

## Functions

fixed_from_persian (p_date)
  Fixed date of Astronomical Persian date `p_date`.

  ### Parameters:

  - p_date table Persian date {year, month, day}.

  ### Returns:

  number Fixed date.
persian_from_fixed (date)
  Astronomical Persian date {year, month, day} corresponding to fixed `date`.

  ### Parameters:

  - date number Fixed date.

  ### Returns:

  table {year, month, day}
fixed_from_arithmetic_persian (p_date)
  Fixed date equivalent to arithmetic Persian date `p_date`.

  ### Parameters:

  - p_date table Persian date {year, month, day}.

  ### Returns:

  number Fixed date.
arithmetic_persian_from_fixed (date)
  Arithmetic Persian date {year, month, day} corresponding to fixed `date`.

  ### Parameters:

  - date number Fixed date.

  ### Returns:

  table {year, month, day}
arithmetic_persian_leap_year (p_year)
  True if arithmetic Persian year `p_year` is a leap year.

  ### Parameters:

  - p_year number Persian year.

  ### Returns:

  boolean

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