First of all thank you for this cool and short routine to determine sun and moon data. I noticed, that the moon-set date remains on the same day if it is after midnight. I think the date should be one day later (add 1 day to date). I added following to the getMoonTimes method almost at the end (where if (sett): is):
def getMoonTimes(date, lat, lng):
if (sett):
if int(sett) == 0:
sett +=24
result["set"] = hoursLater(t, sett)
First of all thank you for this cool and short routine to determine sun and moon data. I noticed, that the moon-set date remains on the same day if it is after midnight. I think the date should be one day later (add 1 day to date). I added following to the getMoonTimes method almost at the end (where
if (sett):
is):def getMoonTimes(date, lat, lng):