vs code lua 如何从一个全局函数中跳转到另一个函数中,有什么办法,已经装有luaide 和 Emmylua

2020-04-17 娱乐 352阅读
function isToday(timestamp) local today = os.date("*t") local secondOfToday = os.time({day=today.day, month=today.month, year=today.year, hour=0, minute=0, second=0}) if timestamp >= secondOfToday and timestamp < secondOfToday + 24 * 60 * 60 then return true else return false end end print(isToday(os.time({day=17, month=5, year=2012, hour=0, minute=0, second=0}))) print(isToday(os.time({day=17, month=5, year=2012, hour=16, minute=28, second=38}))) print(isToday(os.time({day=17, month=5, year=2012, hour=23, minute=59, second=59}))) print(isToday(os.time({day=16, month=5, year=2012, hour=23, minute=59, second=59}))) print(isToday(os.time({day=18, month=5, year=2012, hour=0, minute=0, second=0})))
声明:你问我答网所有作品(图文、音视频)均由用户自行上传分享,仅供网友学习交流。若您的权利被侵害,请联系fangmu6661024@163.com