MCPcopy
hub / github.com/pyload/pyload / compare_time

Function compare_time

module/utils.py:78–88  ·  view source on GitHub ↗
(start, end)

Source from the content-addressed store, hash-verified

76 return enc
77
78def compare_time(start, end):
79 start = map(int, start)
80 end = map(int, end)
81
82 if start == end: return True
83
84 now = list(time.localtime()[3:5])
85 if start < now < end: return True
86 elif start > end and (now > start or now < end): return True
87 elif start < now > end < start: return True
88 else: return False
89
90
91def formatSize(size):

Callers 2

isTimeDownloadMethod · 0.90
isTimeReconnectMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected