Module calendrica-modern-hindu
Modern Hindu solar and lunar calendar conversions (traditional 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.
Info:
- Release: 0.2 2026-09-21
Functions
| hindu_lunar_phase (tee) | Longitudinal distance between sun and moon in degrees at moment tee. |
| hindu_solar_from_fixed (date) | Hindu (Orissa) solar date {year, month, day} equivalent to fixed date. |
| fixed_from_hindu_solar (s_date) | Fixed date corresponding to Hindu solar date s_date (Saka era; Orissa rule). |
| hindu_lunar_from_fixed (date) | Hindu lunar date {year,month,leap_month,day,leap_day} equivalent to fixed date. |
| fixed_from_hindu_lunar (l_date) | Fixed date corresponding to Hindu lunar date l_date. |
| astro_hindu_solar_from_fixed (date) | Astronomical Hindu (Tamil) solar date {year, month, day} equivalent to fixed date. |
| fixed_from_astro_hindu_solar (s_date) | Fixed date corresponding to astronomical Hindu solar date s_date (Tamil rule; Saka era). |
| astro_hindu_lunar_from_fixed (date) | Astronomical Hindu lunar date {year,month,leap_month,day,leap_day} equivalent to fixed date. |
| fixed_from_astro_hindu_lunar (l_date) | Fixed date corresponding to astronomical Hindu lunar date l_date. |
| mesha_samkranti (g_year) | Fixed moment of Mesha Samkranti (Hindu solar new year, sun enters Aries) in Gregorian year g_year. |
| shiva (g_year) | Fixed dates of Maha Shivaratri (Night of Shiva) in Gregorian year g_year. |
| rama (g_year) | Fixed dates of Rama Navami (Rama’s Birthday) in Gregorian year g_year. |
| sacred_wednesdays (g_year) | Fixed dates of Sacred Wednesdays (lunar day 8) in Gregorian year g_year. |
| hindu_sunrise (date) | Moment of sunrise at HINDU_LOCATION on fixed date (traditional calculation). |
| hindu_sunset (date) | Moment of sunset at HINDU_LOCATION on fixed date (traditional calculation). |
| astro_hindu_sunrise (date) | Moment of geometrical sunrise at HINDU_LOCATION on fixed date, in
universal time (astronomical calendars; CC4 errata #15). |
| astro_hindu_sunset (date) | Moment of geometrical sunset at HINDU_LOCATION on fixed date, in
universal time (astronomical calendars; CC4 errata #15). |
| hindu_lunar_station (date) | Nakshatra (lunar station, 1..27) at sunrise on fixed date. |
| hindu_fullmoon_from_fixed (date) | Hindu lunar date in full-moon scheme for fixed date. |
| hindu_expunged (l_year, l_month) | True if Hindu lunar month l_month in year l_year is expunged (skipped). |
| hindu_lunar_holiday (l_month, l_day, g_year) | Fixed dates of Hindu lunar l_month/l_day falling in Gregorian year g_year. |
Functions
- hindu_lunar_phase (tee)
-
Longitudinal distance between sun and moon in degrees at moment
tee. Used as the angular function for invert_angular in lunar_day_at_or_after.Parameters:
- tee number Moment.
Returns:
-
number
Phase angle in degrees [0, 360).
- hindu_solar_from_fixed (date)
-
Hindu (Orissa) solar date {year, month, day} equivalent to fixed
date.Parameters:
- date number Fixed date.
Returns:
-
table
{year, month, day}
- fixed_from_hindu_solar (s_date)
-
Fixed date corresponding to Hindu solar date
s_date(Saka era; Orissa rule).Parameters:
- s_date table Hindu solar date {year, month, day}.
Returns:
-
number
Fixed date.
- hindu_lunar_from_fixed (date)
-
Hindu lunar date {year,month,leap_month,day,leap_day} equivalent to fixed
date.Parameters:
- date number Fixed date.
Returns:
-
table
{year, month, leap_month, day, leap_day}
- fixed_from_hindu_lunar (l_date)
-
Fixed date corresponding to Hindu lunar date
l_date.Parameters:
- l_date table Hindu lunar date {year, month, leap_month, day, leap_day}.
Returns:
-
number
Fixed date.
- astro_hindu_solar_from_fixed (date)
-
Astronomical Hindu (Tamil) solar date {year, month, day} equivalent to fixed
date.Parameters:
- date number Fixed date.
Returns:
-
table
{year, month, day}
- fixed_from_astro_hindu_solar (s_date)
-
Fixed date corresponding to astronomical Hindu solar date
s_date(Tamil rule; Saka era).Parameters:
- s_date table Hindu solar date {year, month, day}.
Returns:
-
number
Fixed date.
- astro_hindu_lunar_from_fixed (date)
-
Astronomical Hindu lunar date {year,month,leap_month,day,leap_day} equivalent to fixed
date.Parameters:
- date number Fixed date.
Returns:
-
table
{year, month, leap_month, day, leap_day}
- fixed_from_astro_hindu_lunar (l_date)
-
Fixed date corresponding to astronomical Hindu lunar date
l_date.Parameters:
- l_date table Hindu lunar date {year, month, leap_month, day, leap_day}.
Returns:
-
number
Fixed date.
- mesha_samkranti (g_year)
-
Fixed moment of Mesha Samkranti (Hindu solar new year, sun enters Aries) in Gregorian year
g_year.Parameters:
- g_year number Gregorian year.
Returns:
-
number
Fixed moment.
- shiva (g_year)
-
Fixed dates of Maha Shivaratri (Night of Shiva) in Gregorian year
g_year.Parameters:
- g_year number Gregorian year.
Returns:
-
{number,...}
Fixed dates.
- rama (g_year)
-
Fixed dates of Rama Navami (Rama’s Birthday) in Gregorian year
g_year.Parameters:
- g_year number Gregorian year.
Returns:
-
{number,...}
Fixed dates.
- sacred_wednesdays (g_year)
-
Fixed dates of Sacred Wednesdays (lunar day 8) in Gregorian year
g_year.Parameters:
- g_year number Gregorian year.
Returns:
-
{number,...}
Fixed dates.
- hindu_sunrise (date)
-
Moment of sunrise at HINDU_LOCATION on fixed
date(traditional calculation).Parameters:
- date number Fixed date.
Returns:
-
number
Moment.
- hindu_sunset (date)
-
Moment of sunset at HINDU_LOCATION on fixed
date(traditional calculation).Parameters:
- date number Fixed date.
Returns:
-
number
Moment.
- astro_hindu_sunrise (date)
-
Moment of geometrical sunrise at HINDU_LOCATION on fixed
date, in universal time (astronomical calendars; CC4 errata #15).Parameters:
- date number Fixed date.
Returns:
-
number
Moment (UT).
- astro_hindu_sunset (date)
-
Moment of geometrical sunset at HINDU_LOCATION on fixed
date, in universal time (astronomical calendars; CC4 errata #15).Parameters:
- date number Fixed date.
Returns:
-
number
Moment (UT).
- hindu_lunar_station (date)
-
Nakshatra (lunar station, 1..27) at sunrise on fixed
date.Parameters:
- date number Fixed date.
Returns:
-
number
Nakshatra index.
- hindu_fullmoon_from_fixed (date)
-
Hindu lunar date in full-moon scheme for fixed
date.Parameters:
- date number Fixed date.
Returns:
-
table
Hindu lunar date {year, month, leap_month, day, leap_day}.
- hindu_expunged (l_year, l_month)
-
True if Hindu lunar month
l_monthin yearl_yearis expunged (skipped).Parameters:
- l_year number Hindu lunar year.
- l_month number Hindu lunar month.
Returns:
-
boolean
- hindu_lunar_holiday (l_month, l_day, g_year)
-
Fixed dates of Hindu lunar
l_month/l_dayfalling in Gregorian yearg_year.Parameters:
- l_month number Hindu lunar month.
- l_day number Hindu lunar day.
- g_year number Gregorian year.
Returns:
-
{number,...}
Fixed dates.