mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-10-31 20:05:13 +08:00
update 2026-08-25 00:29:42
This commit is contained in:
1 parent
0f2308381e
commit
c37bb21446
44 files changed
+4642
-4640
No files matched your search
@@ -464,14 +464,14 @@ datatypes.json = is_json
|
||||
|
||||
function is_timehhmm(str)
|
||||
local hour, minute = string.match(str, "^(%d?%d):(%d%d)$")
|
||||
if hour and minute then
|
||||
hour = tonumber(hour)
|
||||
minute = tonumber(minute)
|
||||
if hour >= 0 and hour <= 23 and minute >= 0 and minute <= 59 then
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
if hour and minute then
|
||||
hour = tonumber(hour)
|
||||
minute = tonumber(minute)
|
||||
if hour >= 0 and hour <= 23 and minute >= 0 and minute <= 59 then
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
datatypes.timehhmm = is_timehhmm
|
||||
|
||||
|
||||
Reference in new issue
Block a user