跳转到内容

模块:Timer

来自流放之路2Wiki
Admin留言 | 贡献2025年4月13日 (日) 05:56的版本 (创建页面,内容为“local p = {} function p.countdown(frame) local targetDate = os.time{year=2025, month=4, day=20} local currentDate = os.time() local diff = targetDate - currentDate return tostring(math.floor(diff / 86400)) .. "天剩余" end return p”)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)

此模块的文档可以在模块:Timer/doc创建

local p = {}
function p.countdown(frame)
    local targetDate = os.time{year=2025, month=4, day=20}
    local currentDate = os.time()
    local diff = targetDate - currentDate
    return tostring(math.floor(diff / 86400)) .. "天剩余"
end
return p