Created
June 9, 2020 20:44
-
-
Save hdelei/7cabc548ffa43ee7ea4153f2748998d0 to your computer and use it in GitHub Desktop.
Time shifts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def check_time(start, stop, current): | |
if stop < start: | |
print('stop < start') | |
if start < current < 2359 or 0 < current < stop: | |
print('start < current < 2359 and 0 < current < stop') | |
return True | |
else: | |
print('start < current < 2359 and 0 < current < stop') | |
return False | |
if start < current < stop: | |
print('start < current < stop') | |
return True | |
print('Time out of range') | |
return False | |
start = 2300 | |
stop = 459 | |
current = 2301 | |
print(check_time(start, stop, current)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment