level 5
小天😘😈
楼主
function comparetime(strtime1, strtime2)
--比较现在的时间是不是在strtime1和strtime2之间
--比如 comparetime("20:00", "23:00")
--如果是就返回真
local time1 = os.date("*t")
local time2 = os.date("*t")
网页链接 = strtime1:sub(1,2)
网页链接 = strtime1:sub(4,5)
网页链接 = strtime2:sub(1,2)
网页链接 = strtime2:sub(4,5)
return os.time() >= os.time(time1) and os.time() <= os.time(time2)
end
2023年06月24日 12点06分
1
--比较现在的时间是不是在strtime1和strtime2之间
--比如 comparetime("20:00", "23:00")
--如果是就返回真
local time1 = os.date("*t")
local time2 = os.date("*t")
网页链接 = strtime1:sub(1,2)
网页链接 = strtime1:sub(4,5)
网页链接 = strtime2:sub(1,2)
网页链接 = strtime2:sub(4,5)
return os.time() >= os.time(time1) and os.time() <= os.time(time2)
end