Template:HINDUSOLARDATE
| This template uses Lua: |
{{HINDUCALENDAR}} gives a date in various Hindu calendars. The year, month and day can be given as parameters, but if not, they will default to the current date in UTC. The algorithms are taken from the modern Hindu calendars described in Calendrical Calculations by Nachum Dershowitz and Edward Reingold, which are based on the traditional astronomical rules of the Sūrya-Siddhānta.
It should be noted that there are over 30 different Hindu calendar versions currently in use, many of which vary widely from the implementation given here. It should also be noted that, by default, this implementation switches the days at midnight in UTC, whereas in the Hindu calendar days begin and end at sunrise.
Usage
- Syntax
{{HINDUCALENDAR|format=format|year|month|day}}
- Examples
{{HINDUCALENDAR}}↓{{HINDUCALENDAR|format=MDY}}↓{{HINDUCALENDAR|1945|11|12}}↓
Solar calendar
{{HINDUSOLARDATE}} gives the date in the Hindu solar calendar. The year number is according to the expired Śaka Era. The implementation follows the Orissa rule, in which the solar month applying to a civil day is determined from the zodiacal position of the Sun at sunrise on the following morning. This calendar should not be confused with the Indian national calendar, which also numbers its years in the Śaka Era but was introduced as a reformed civil calendar in 1957.
- Examples
{{HINDUSOLARDATE}}→ 8 Āśvina, 1948 SE{{HINDUSOLARDATE|format=MDY}}→ Āśvina 8, 1948 SE{{HINDUSOLARDATE|1945|11|12}}→ 27 Kārtika, 1867 SE
- Individual units of time
- The current year:
{{HINDUSOLARDATE/year}}→ 1948 SE - The current month:
{{HINDUSOLARDATE/month}}→ Āśvina - The current day of the month:
{{HINDUSOLARDATE/day}}→ 8
Lunisolar calendar
{{HINDULUNARDATE}} gives the date in the Hindu lunisolar calendar (i.e. the Vikram Samvat). The year number is according to the expired Vikrama Era. The implementation follows the southern Indian amānta scheme, in which a lunar month begins and ends at the new moon, instead of the northern Indian pūrṇimānta scheme in which months go from full moon to full moon. The year begins in Chaitra, as it does in the Indian version, and not Vaishakha like in the Nepali version. {{HINDULUNARDATE/tithi}} gives the tithi at sunrise on the current/given day.
- Examples
{{HINDULUNARDATE}}→ Trayodaśī, Śukla pakṣa of Bhādrapada, 2083 VE{{HINDULUNARDATE|format=MDY}}→ Śukla pakṣa of Bhādrapada, Trayodaśī, 2083 VE{{HINDULUNARDATE|1945|11|12}}→ Saptamī, Śukla pakṣa of Kārtika, 2002 VE
- Individual units of time
- The current year:
{{HINDULUNARDATE/year}}→ 2083 VE - The current month:
{{HINDULUNARDATE/month}}→ Bhādrapada - The current day of the month:
{{HINDULUNARDATE/day}}→ Trayodaśī - Whether today is a leap day:
{{HINDULUNARDATE/leap-day}}→ 0 - The current pakṣa:
{{HINDULUNARDATE/paksha}}→ Śukla - The current tithi:
{{HINDULUNARDATE/tithi}}→ Trayodaśī
Samvatsara
{{HINDUCALENDAR/Samvatsara}} gives the current samvatsara of the Hindu Jovian cycle. This implementation is based on a literal division of Jupiter's orbit by 12, with a year's samvatsara being "expunged" (skipped) every 85–86 years to keep it in line with the solar year. In southern India, this system has been replaced by a simple cycle of 60 lunisolar years (see page 48 here). Because of this, the samvatsara given by this template may differ from those given in other sources online. For example, the northern Indian samvatsara for 2026 is Rāudra, but the southern Indian one is Parābhava. Panchāngs like this one give both.
- Examples
{{HINDUCALENDAR/Samvatsara}}→ Rāudra{{HINDUCALENDAR/Samvatsara|1945|11|12}}→ Vilamba
Ahargana
{{HINDUCALENDAR/ahargana}} returns the current/given day's Kali ahargaṇa number. As with all the year counters used in this template, it counts elapsed days (that is, the Kali epoch itself is day 0, not 1).
- Examples
{{HINDUCALENDAR/ahargana}}→ 1,872,842{{HINDUCALENDAR/ahargana|1945|11|12}}→ 1,843,306
Yoga
{{HINDUCALENDAR/yoga}} returns the current or given day's yoga.
- Examples
{{HINDUCALENDAR/yoga}}→ Dhṛti{{HINDUCALENDAR/yoga|1945|11|12}}→ Gaṇḍa
Nakṣatra
{{HINDUCALENDAR/nakshatra}} returns the current or given day's nakṣatra.
Source
- Dershowitz, Nachum; Reingold, Edward M. (2018). Calendrical Calculations: The Ultimate Edition (Fourth ed.). Cambridge: Cambridge University Press. ISBN 978-1107057623.