suncalcPy icon indicating copy to clipboard operation
suncalcPy copied to clipboard

Moonset if Hour is 0 then it should be the next day

Open DragonflyNet67 opened this issue 5 years ago • 0 comments

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)

DragonflyNet67 avatar Aug 27 '20 14:08 DragonflyNet67