Skip to content
Documentation · all sections

Accuracy

panchang-ts · v5.0.0 · MIT

What the 8,368-test suite verifies against reference panchangs, end-time drift bounds, ayanamsa provenance, and documented festival-dating tradeoffs.

8,368 tests across 121 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

ElementAccuracy
Sunrise / Sunset≤29 s observed vs reference minute-midpoint (±45 s tolerance)
Moonrise / MoonsetMeeus apparent-upper-limb (refraction + parallax); ~3–5 min vs simpler-horizon authorities is expected
Tithi / Nakshatra / Yoga / Karana namesexact 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 longitudecross-checked against Jagannath Hora reference charts
D1 / D9 house placementexact match vs reference for 9-graha placement
Ashtakoot total±1 point per pair across 30+ matched pairs
Sade Sati arc start/end±1–2 days vs authoritative ephemerides

Detection conventions

ElementConvention
Aadal / Vidaalclassical Moon-from-Sun nakshatra-distance rule (AstroShastra, HoraSarvam, Ernst Wilhelm) — NOT the Tamil-Vakya weekday rule used by some online panchangs
Varjyamemits the sunrise-anchored nakshatra’s window only
Do Ghati Muhurtadoes not rotate by weekday — the same 30-name deity-keyed sequence applies every day

Festival detection — documented tradeoff

The library uses tithi-at-sunrise to resolve a festival to a calendar day. Some authorities use other classical rules for certain festivals; where those rules pick a different day, output can drift ±1 day:

Alternative ruleAffects
Tithi-at-midnightKrishna Janmashtami, Maha Shivaratri, Diwali / Lakshmi Puja
Madhyahna-vyapiniGanesh Chaturthi (edge years), Akshaya Tritiya 2026
Kshaya-tithi handlingUgadi 2026-03-19 (Pratipada is Kshaya)

Everything else — Holi, Ugadi (non-Kshaya years), Rama Navami, Raksha Bandhan, Ganesh Chaturthi (normal years), Navaratri, Dussehra, Karva Chauth, Hanuman Jayanti — matches the canonical date across the 2025 and 2026 fixtures. See also Festivals.