- Dharmagya
- panchang-ts docs
- Accuracy
Accuracy
panchang-ts · v5.1.1 · MIT
What the 8,661-test suite verifies against reference panchangs, end-time drift bounds, ayanamsa provenance, and documented festival-dating tradeoffs.
8,772 tests across 137 files, including fixtures cross-verified against reference panchang calculations spanning 2025–2026 across 10 Indian cities plus New York, London, Sydney, Dubai, and Singapore (the diaspora fixtures cover DST on America/New_York).
What is verified, and to what tolerance
| Element | Accuracy |
|---|---|
| Sunrise / Sunset | ≤29 s observed vs reference minute-midpoint (±45 s tolerance) |
| Moonrise / Moonset | Meeus apparent-upper-limb (refraction + parallax); ~3–5 min vs simpler-horizon authorities is expected |
| Tithi / Nakshatra / Yoga / Karana names | exact match vs reference |
| Tithi / Nakshatra / Yoga / Karana end-times | ≤60 s vs Drik across all 20 audited comparisons (tithi 46 s, karana 51 s, nakshatra 24 s, yoga 60 s) |
| Ayanamsa (Lahiri) | reproduces DrikPanchang’s published value to ~0.01″ across 1950–2050 |
| Planetary positions (Sun–Saturn) | ±0.02° sidereal |
| Planetary positions (Rahu/Ketu, mean node) | ≤0.5° typical; ±2° tolerance |
| Planetary positions (Rahu/Ketu, true node) | ≤0.6° typical (Meeus periodic correction) |
| Lagna sidereal longitude | cross-checked against Jagannath Hora reference charts |
| D1 / D9 house placement | exact match vs reference for 9-graha placement |
| Ashtakoot total | ±1 point per pair across 30+ matched pairs |
| Varjyam windows | count + position vs DrikPanchang over a 61-day, two-nakshatra-cycle sweep — 62/62 windows within ≤2 min (display truncation dominates) |
| Sade Sati arc start/end | ±1–2 days vs authoritative ephemerides |
| Amrit Kala windows | nakshatra-anchored, 4 elastic ghatikas wide; 27-offset table recovered from 54 DrikPanchang windows covering all 27 nakshatras (spread ≤0.1 ghati) |
| Dur Muhurta windows | classical Muhurta-Chintamani ordinals, verified across 58 consecutive DrikPanchang day-pages in two cities with zero exceptions; one full week pinned to ±2 min |
| Choghadiya / Gowri | names and boundaries verified against 14 consecutive DrikPanchang nights across two cities |
Detection conventions
| Element | Convention |
|---|---|
| Aadal / Vidaal | classical Moon-from-Sun nakshatra-distance rule (AstroShastra, HoraSarvam, Ernst Wilhelm) — NOT the Tamil-Vakya weekday rule used by some online panchangs |
| Varjyam | every window whose START falls in the Hindu day (DrikPanchang attribution; a pre-sunrise start belongs to the previous day). Mula carries two tyajya spells — elapsed ghatikas 20 and 56 (Drik, ProKerala, Raman’s Muhurta concur) |
| Do Ghati Muhurta | does not rotate by weekday — the same 30-name deity-keyed sequence applies every day |
Festival day resolution
Festivals are not resolved by tithi-at-sunrise alone. Each rule in the registry declares the kala its tradition actually uses, and the day is picked by testing the tithi in that window:
| Kala rule | Used by |
|---|---|
| madhyahna (solar noon) | Ganesh Chaturthi, Rama Navami, Akshaya Tritiya, Vasant Panchami, Vinayaka Chaturthi |
| pradosha (sunset) | Diwali, Dhanteras |
| nishita (midnight) | Maha Shivaratri, Masik Shivaratri |
| chandrodaya (moonrise) | Karva Chauth, Sankashti Chaturthi — with a sunrise fallback when the tithi misses both moonrises, and a vriddha dedupe when it spans two |
| aparahna-full | Vijayadashami — the day covering the whole aparahna wins; when neither does, the tithi-END day takes it (para-viddha). Pinned across 11 DrikPanchang years |
| janmashtami-nishita | Krishna Janmashtami — the udaya-Ashtami day wins whenever Ashtami OR Rohini touches its nishita muhurta, else the day Ashtami covers nishita, Saptami-viddha or not. Pinned across 7 DrikPanchang years |
| sunrise (default) | everything else — Holi, Ugadi, Raksha Bandhan, Navaratri, Hanuman Jayanti… |
Calendar-day rules validated against DrikPanchang
| Rule | Evidence |
|---|---|
| Sankranti observance day | a daylight transit keeps its civil day; a transit between sunset and the next sunrise is observed on the next sunrise’s day. Full 2027 table pinned — day plus transit moment to ≤2 min |
| Regional solar new years | Puthandu, Vaisakhi, Vishu and Pohela Boishakh each key off the transit moment differently and can land on three different dates in one year. 20 region-years pinned across 2025–2029 |
| Ekadashi Smarta / Vaishnava split | on the days DrikPanchang prints the fast twice the earlier day is Smarta and the later Vaishnava — across all three geometries that split (Dashami-viddha, vriddha Dwadashi, kshaya). All 109 Ekadashi tithi windows of 2024–2028 swept, 151 emission-days compared |
| Kshaya / vriddha / Trisprisha Ekadashi | the 2026 (24-date) and 2027 (25-date) DrikPanchang fast lists reproduce exactly |
| Adhika masa | true bounding new moons; Adhika-Chaitra years resolve the celebrated (nija) pratipada |
See also Festivals.
