Back to feed
Dev.to
Dev.to
6/11/2026
Hindu Festival Tithi Rules

Hindu Festival Tithi Rules

Short summary

A developer fixed an off-by-one calendar bug in Bhai Dooj calculations by adding a single muhurta rule (aparahna timing window) and updating the tie-breaking logic—a two-line fix aligned with 250-year-old Sanskrit jurisprudence. The deeper insight: festival definitions are transcriptions of medieval Hindu law into code, and engineers' job is catching up to centuries-old celestial rules encoded in legal verses.

  • Bhai Dooj showed Nov 11 instead of Nov 10 because the calendar engine lacked the aparahna muhurta rule
  • The fix: add one field to the festival definition and include 'aparahna' in the tie-breaking array
  • Foundation: classical Sanskrit jurists encoded tie-breaking rules; modern code transcribes their law, not configs

Generated with AI, which can make mistakes.

Is this a good recommendation for you?

Comments

Failed to load comments. Please try again.

Explore more