lua-calendrica

# Module `calendrica-old-hindu`

Old Hindu solar and lunar 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

hindu_solar_date (year, month, day) | Construct a Hindu solar date {year, month, day}.
old_hindu_solar_from_fixed (date) | Old Hindu solar date {year, month, day} equivalent to fixed `date`.
fixed_from_old_hindu_solar (s_date) | Fixed date corresponding to Old Hindu solar date `s_date`.
old_hindu_lunar_from_fixed (date) | Old Hindu lunar date {year, month, leap, day} equivalent to fixed `date`.
fixed_from_old_hindu_lunar (l_date) | Fixed date corresponding to Old Hindu lunar date `l_date`.
old_hindu_lunar_leap_year (l_year) | True if Old Hindu lunar year `l_year` is a leap year.
jovian_year (date) | Year in Jupiter's 60-year cycle for fixed `date`.

## Functions

hindu_solar_date (year, month, day)
  Construct a Hindu solar date {year, month, day}.

  ### Parameters:

  - year number Hindu solar year.
  - month number Hindu solar month.
  - day number Hindu solar day.

  ### Returns:

  table {year, month, day}
old_hindu_solar_from_fixed (date)
  Old Hindu solar date {year, month, day} equivalent to fixed `date`.

  ### Parameters:

  - date number Fixed date.

  ### Returns:

  table {year, month, day}
fixed_from_old_hindu_solar (s_date)
  Fixed date corresponding to Old Hindu solar date `s_date`.

  ### Parameters:

  - s_date table Hindu solar date {year, month, day}.

  ### Returns:

  number Fixed date.
old_hindu_lunar_from_fixed (date)
  Old Hindu lunar date {year, month, leap, day} equivalent to fixed `date`.

  ### Parameters:

  - date number Fixed date.

  ### Returns:

  table {year, month, leap, day}
fixed_from_old_hindu_lunar (l_date)
  Fixed date corresponding to Old Hindu lunar date `l_date`.

  ### Parameters:

  - l_date table Old Hindu lunar date {year, month, leap, day}.

  ### Returns:

  number Fixed date.
old_hindu_lunar_leap_year (l_year)
  True if Old Hindu lunar year `l_year` is a leap year.

  ### Parameters:

  - l_year number Old Hindu lunar year.

  ### Returns:

  boolean
jovian_year (date)
  Year in Jupiter's 60-year cycle for fixed `date`.

  ### Parameters:

  - date number Fixed date.

  ### Returns:

  number Year (1..60).

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