当前位置:网站首页>Lua determines whether the current time is the time of the day
Lua determines whether the current time is the time of the day
2022-07-05 04:56:00 【Meteor spot】
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
边栏推荐
- PostgreSQL surpasses mysql, and the salary of "the best programming language in the world" is low
- China polyurethane rigid foam Market Research and investment forecast report (2022 Edition)
- JMeter -- distributed pressure measurement
- 中国针状焦行业发展研究与投资价值报告(2022版)
- Research and investment forecast report of adamantane industry in China (2022 Edition)
- China needle coke industry development research and investment value report (2022 Edition)
- 2022 American College Students' mathematical modeling ABCDEF problem thinking /2022 American match ABCDEF problem analysis
- AutoCAD - lengthening
- Redis has four methods for checking big keys, which are necessary for optimization
- Is $20billion a little less? Cisco is interested in Splunk?
猜你喜欢
2022 thinking of mathematical modeling a problem of American college students / analysis of 2022 American competition a problem
Solution of circular dependency
Use assimp library to read MTL file data
用 Jmeter 工具做个小型压力测试
数论函数及其求和 待更新
AutoCAD - workspace settings
AutoCAD - full screen display
【Leetcode】1352. Product of the last K numbers
[groovy] closure (closure call | closure default parameter it | code example)
2022 thinking of Mathematical Modeling B problem of American college students / analysis of 2022 American competition B problem
随机推荐
Sixth note
AutoCAD - full screen display
54. Spiral matrix & 59 Spiral matrix II ●●
【Leetcode】1352. Product of the last K numbers
Special information | real estate and office buildings - 22.1.9
MD5绕过
SQL set operation
Flutter 小技巧之 ListView 和 PageView 的各种花式嵌套
Error statuslogger log4j2 could not find a logging implementation
[LeetCode] 整数反转【7】
2022/7/2做题总结
Unity and database
"Measuring curve length" of CAD dream drawing
Unity parallax infinite scrolling background
PostgreSQL surpasses mysql, and the salary of "the best programming language in the world" is low
Pdf to DWG in CAD
mysql審計日志歸檔
2022/7/1学习总结
JVM 原理和流程简介
3dsmax2018 common operations and some shortcut keys of editable polygons