Created
December 30, 2012 09:09
-
-
Save prafulliu/4411731 to your computer and use it in GitHub Desktop.
lua判断两天是否连续
This file contains hidden or 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
local t1 = os.time{year = 2012, month = 12, day = 19, hour = 0, sec = 0} | |
local t2 = os.time{year = 2012, month = 12, day = 19, hour = 23, sec = 59} | |
if (t1 - t2) <= 86400 and | |
(os.date("%d", t1) ~= os.date("%d",t2)) then | |
-- 判断是否有新手目标 | |
print("called") | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment