jyotisham / jyotisha

Python tools for the astronomical / astrological vedAnga of Hindus
MIT License
88 stars 52 forks source link

How to find Tamil month for a given calendar date #119

Closed sivachandran closed 2 years ago

sivachandran commented 2 years ago

Is it possible to find Tamil month name for a given calendar date? If possible, can you share a snippet to show how to do it?

vvasuki commented 2 years ago

@karthikraman can confirm, but I don't think it's currently supported. Perhaps you could contribute an addition TAMIL_MONTH_NAMES on the lines of https://github.com/jyotisham/adyatithi/blob/3b557c3ea1d90e12f9289e2ef2d77eada894d3bd/period_names/translation_table.json#L519 , and then simply translate day_panchaanga.solar_sidereal_date_sunset.month using it as follows:

names.NAMES["TAMIL_MONTH_NAMES"]["ta"][sidereal_month_num-1]

karthikraman commented 2 years ago

@vvasuki is right—it can be readily inferred from the day_panchaanga.solar_sidereal_date_sunset.month