Hello All,
I have been stuck with this for a while now and don't seem to be arriving at a logical solution.
I have a 7 hour work to do starting anytime from 0000h to 2400 h. Within the span of this work,I need to find out night time(if any) and day time(if any) depending on sunrise and sunset times for the calendar day.For eg if sunrise is 0500 and I start work at 0200,then night time will be 3h and day time 4h OR if I start work at 1500 and sunset is 1730 then day time is 2h30m and 4h30m night time OR if I start work at 2330 the work progresses to next calendar day and if sunrise is 0500 then night time will be 05h30m and day time 01h30m.
I can find out sunrise sunset time for 1st and 2nd calendar days using the astro lib of b4a, but I am not able to arrive at a logical code for calculating the day and night components.
Any help will be greatly appreciated..Thank you
I have been stuck with this for a while now and don't seem to be arriving at a logical solution.
I have a 7 hour work to do starting anytime from 0000h to 2400 h. Within the span of this work,I need to find out night time(if any) and day time(if any) depending on sunrise and sunset times for the calendar day.For eg if sunrise is 0500 and I start work at 0200,then night time will be 3h and day time 4h OR if I start work at 1500 and sunset is 1730 then day time is 2h30m and 4h30m night time OR if I start work at 2330 the work progresses to next calendar day and if sunrise is 0500 then night time will be 05h30m and day time 01h30m.
I can find out sunrise sunset time for 1st and 2nd calendar days using the astro lib of b4a, but I am not able to arrive at a logical code for calculating the day and night components.
Any help will be greatly appreciated..Thank you