Skip to content

How the panchang will be computed

These are the conventions the TithiKit engine is being built to. They are fixed in advance and published so that you can compare our output with any almanac and know why the two might differ. The engine is in development; this page will gain version numbers and citations as it ships.

Conventions at a glance

TopicConvention
Ephemeris (offline)Skyfield (MIT license) with NASA JPL DE440s, run in a build job to precompute every location-independent instant from 1900 to 2100: tithi, karana, nakshatra and yoga boundaries, sankrantis, new and full moons
Ephemeris (per request)Astronomy Engine (MIT license) for location-dependent quantities only: sunrise, sunset, moonrise, moonset
AyanamsaLahiri (Chitrapaksha). The exact definition and the reference values we test against will be published here with their citation
SunriseUpper limb of the Sun on the horizon, standard refraction of 34′, observer elevation 0 m by default (optional elevation parameter)
DaySunrise to next sunrise; the elements in effect at local sunrise name the day
TimezonesIANA timezone database; the tzdb version is reported in every response, and known DST transitions are covered by tests
High latitudesIf there is no sunrise, sunrise is null and the day falls back to civil midnight, flagged in the response. This is our convention, not a tradition
MonthsAmanta and purnimanta names; a lunar month without a sankranti is an adhika (leap) month
FestivalsEach festival has a rule ID and rule text with a cited source; tradition variants are returned separately

Why two ephemerides

Lunar-day and other boundaries do not depend on where you are, so they are computed once, offline, with a high-precision ephemeris and shipped as a versioned table. Sunrise does depend on location, so it is computed per request. Astronomy Engine states an accuracy of about one arcminute. That is fine for sunrise, but the Sun moves about one degree a day, so a one-arcminute error in the Sun's position would move a sankranti by roughly 24 minutes. We therefore never compute sankrantis at request time.

The ayanamsa is the bigger error source

Sidereal positions depend on the ayanamsa, the offset between the tropical and sidereal longitude reference frames used by Indian calendars. A difference of one arcminute in the ayanamsa moves a sankranti by about 24 minutes and a nakshatra boundary by about two minutes. That is larger than the ephemeris error, so the ayanamsa definition gets its own citation and its own tests. More in Lahiri ayanamsa explained.

Sunrise causes most minute-level disagreements

Almanacs differ on whether sunrise is the Sun's upper edge or its center touching the horizon, how much atmospheric refraction to assume, and the observer's elevation. Each choice moves sunrise by a minute or more. Near a boundary, that can change which tithi is in effect at sunrise. We publish our choice and report it in every response. See which sunrise?

Timezones are data, not arithmetic

Local times are converted with the IANA timezone database, never with fixed offsets. The database changes when governments change their rules, so the version used is part of every response and part of the test record. See daylight saving pitfalls.

Every rule needs a citation

Festival and regional rules (for example, which civil day begins a solar month in a given regional calendar) are encoded only with a written source. Familiarity is not a citation. Rules without one stay in beta and are labeled as such.

How we will test all of this

See the accuracy suite for the three test layers and what counts as a pass.

Questions about a convention?

Tell us which almanac or tradition you follow; it helps us decide what to verify next.

Calendar and astronomical data for cultural and religious observance. Not advice of any kind.