Import in Python Apps

Install the splendidmoons package:

      
$ pip install splendidmoons
$ splendidmoons asalha-puja 2023
2023-08-01
$ splendidmoons year-events-csv 2020 2030 moondays.csv
      
    

In Python scripts:

      
from splendidmoons.calendar_year import CalendarYear
for year in [2023, 2024, 2025]:
    print(f"{year}: {CalendarYear(year).year_type()}")
# 2023: YearType.Adhikamasa
# 2024: YearType.Normal
# 2025: YearType.Adhikavara