Which sunrise? Why almanacs disagree by minutes
Put two panchangs for the same city side by side and the sunrise times often differ by a few minutes. Both can be correct: they define “sunrise” differently. Since the panchang names each day by what is in effect at sunrise, those minutes occasionally change the date of a tithi. Here is where the differences come from.
1. Upper edge or center of the Sun
The Sun is a disc about half a degree wide. Modern almanacs usually define sunrise as the moment its upper edge (upper limb) appears on the horizon. Some traditional calculations use the center of the disc instead. The center rises roughly 16 arcminutes after the upper edge.
2. Atmospheric refraction
The atmosphere bends sunlight, so we see the Sun above the horizon while it is geometrically still below it. The standard assumption is 34 arcminutes of refraction at the horizon. Real refraction varies with temperature and pressure, and some calculations ignore it entirely.
Combined, the common modern definition places the Sun's center about 50 arcminutes below the geometric horizon at sunrise (34′ refraction + 16′ half-disc). A center-without-refraction definition uses 0.
3. Observer elevation
From a hill or a tall building you see further over the curve of the Earth, so the Sun appears earlier. Most almanacs assume sea level. An app for a mountain town, or one that uses the device's altitude, can differ from a printed almanac by about a minute or more for this reason alone.
How many minutes is that?
Near the equator the Sun climbs about 15 arcminutes per minute of time at sunrise, so a 50-arcminute difference in definition is roughly three to four minutes. At higher latitudes the Sun rises at a shallower angle and the same angular difference takes longer, so the gap grows: several minutes in London or Toronto, and much more toward the polar circles.
When a few minutes change the date
Most days, a few minutes make no difference to the panchang. They matter when a tithi, nakshatra or other element changes close to sunrise. If a tithi ends two minutes after sunrise under one definition, it may end two minutes before sunrise under another. One almanac then labels the day with the ending tithi, the other with the next one. Tithi skips and repeats can also flip.
This is why comparing your output with a printed panchang requires knowing its sunrise definition. When we build reference test cases from printed almanacs, we record the sunrise each source prints and document disagreements caused by definitions separately from real errors.
When there is no sunrise
Above the Arctic and Antarctic circles the Sun can stay above or below the horizon for days or weeks. Traditional rules were not written for these places. Software needs an explicit policy rather than a crash or a silently wrong date. TithiKit's planned convention: return sunrise as null, start the day at civil midnight, and flag the response, clearly labeled as our convention rather than a tradition.
What TithiKit will use
- Upper limb on the horizon.
- Standard refraction of 34′.
- Observer elevation 0 m by default, with an optional elevation parameter.
- The definition reported in every response's metadata.
See the methodology for the full set of conventions and the accuracy suite for how sunrise times will be tested (within ±1 minute of an independent ephemeris).
Checklist for your own code
- Pick one definition and write it down where users can see it.
- Use the user's coordinates, not the nearest big city's, if you have them.
- Handle no-sunrise days explicitly.
- When comparing with an almanac, compare sunrise times first; most disagreements start there.