jremington:
No, that statement is fine, especially if you use unix time instead of day times.YOU have to deal with the special cases, which would obviously require a different, but also simple comparison.
I understand that, I just can't grasp the logic I should use.
Maybe I found out how.
If inputstop > inputstart ( // inputstart and inputstop doesn't cross midnight
If time > timestart && time < timestop (
Ledon
)
)
If input stop < inputstart ( // crosses midnight
If time > inputstart && time > inputstop (
Ledon
)
If time < inputstart && time < inputstop (
Ledon
)
)
Else (ledoff)