Kala Hora has been defined as 1/12th of a day
Dina Dwadasamso Matha Kalahora
If Thursday, then the ruler of the first hour is Jupiter ( Jove or Thor’s day, Thursday)
Pathi tasya poorvasya varadhi nadha
Nisayam thu vareswarath panchamadya
The ruler at night is the fifth lord
meaning on a Sunday, after sunset, the first hour is ruled by Venus
as per the rule
Arka Sukra Budhas Chandra Manda Jeeva Dharasutha
Sun, Venus, Mercury, Moon, Saturn, Jupiter and Mars.
Why is Monday after Sunday ?
The answer is given by the sequential order of Planetary Hours or Kala Hora
On Sunday, at surise, the first hour or Kala Hora is ruled by the ruler of Sunday, the Sun. So after 21 hours, the 22nd hour is ruled by Sun, the 23rd hour by Venus and the 24th hour by Mercury and the 25th hour, that is next day is ruled by Moon and so the next day is Moon’s day or Monday !
Planetary Hour = Duration of day /12
Duration of Day = Sunset – Sunrise
Duration of Night = Sunrise – Sunset
The duration of Night and Day varies and it is not exactly 12 hours. So in the program formulae should be given for finding out Planetary Hours !