Loop between a date of every month,

Hello Killzone_kid.

I read your code and that is precisely what the problem is. See, for the whole 24hr of the "4th day" the while statement will remain true, since when the clock hits night, my day would be the same till the night of the next day.