Module calendrica-balinese
Balinese Pawukon 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.2 2026-09-21
Functions
| bali_pawukon_from_fixed (date) | Positions of date in ten cycles of the Balinese Pawukon calendar. |
| kajeng_keliwon (g_year) | Occurrences of Kajeng Keliwon in Gregorian year g_year. |
| tumpek (g_year) | Occurrences of Tumpek in Gregorian year g_year. |
| bali_week_from_fixed (date) | Week number (1..30) of date in the 210-day Balinese Pawukon cycle. |
| bali_on_or_before (b_date, date) | Latest fixed date on or before date whose Pawukon equals b_date. |
Functions
- bali_pawukon_from_fixed (date)
-
Positions of
datein ten cycles of the Balinese Pawukon calendar.Parameters:
- date number Fixed date.
Returns:
-
table
Balinese date {luang, dwiwara, triwara, caturwara, pancawara,
sadwara, saptawara, asatawara, sangawara, dasawara}
- kajeng_keliwon (g_year)
-
Occurrences of Kajeng Keliwon in Gregorian year
g_year. Kajeng Keliwon falls every 15 days when the 3-day and 5-day weeks coincide.Parameters:
- g_year number Gregorian year.
Returns:
-
{number,...}
Fixed dates.
- tumpek (g_year)
-
Occurrences of Tumpek in Gregorian year
g_year. Tumpek falls every 35 days (intersection of 5-day and 7-day weeks).Parameters:
- g_year number Gregorian year.
Returns:
-
{number,...}
Fixed dates.
- bali_week_from_fixed (date)
-
Week number (1..30) of
datein the 210-day Balinese Pawukon cycle.Parameters:
- date number Fixed date.
Returns:
-
number
Week number.
- bali_on_or_before (b_date, date)
-
Latest fixed date on or before
datewhose Pawukon equalsb_date.Parameters:
- b_date table Balinese Pawukon date.
- date number Fixed date.
Returns:
-
number
Fixed date.