When does the day start?
At sunrise. The panchangam day runs from one sunrise to the next, so at 2 am you are still in yesterday.
This is the single rule that explains most of the calendar arguments people have. A festival appears on the 14th in one almanac and the 15th in another. Two relatives, both careful, keep the fast on different days. Neither is confused. They are using different day boundaries.
What the boundary actually is
Sunrise, at your own place. Not midnight, and not a sunrise computed for some regional centre a hundred kilometres away. Bengaluru and Mysuru are 120 km apart and their sunrises differ by about four minutes, which is usually nothing and occasionally decides a date.
So the day that a panchangam calls Thursday begins at Thursday's sunrise and ends at Friday's. The hours between midnight and sunrise on Friday morning still belong to Thursday.
Why a date can flip
A tithi is not a day. It is the time the Moon takes to gain 12 degrees on the Sun, and it ends whenever it ends — 4 am, 11:20 pm, any time at all. The convention is that the tithi running at sunrise names the day.
Now take a tithi that ends at 6:40 am. If sunrise is 6:12, that tithi was running at sunrise and it names the day. Move 200 km east, where sunrise is 6:50, and it had already ended: a different tithi names the same calendar date. Same sky, same arithmetic, different answer.
That is not an error in either almanac. It is the boundary doing its job.
Where it bites hardest
Observances that depend on a window rather than on sunrise — anything reckoned from sunset, from the middle of the day, or from a named part of the day — can land on either side. Pradosham is decided by the three muhurtas after sunset, not by sunrise at all. Some fasts are decided by which day holds more of the tithi during a specific part of the afternoon.
When you see two dates printed for one festival, this is nearly always where it started.
What we do
Every value on this site is computed for the sunrise of the town you asked for, and every page names which town that was. Where a rule uses a different boundary — sunset, aparahna, the five parts of the day — the page says which boundary it used and where that rule is written down.