模組:沙盒/Hat600/1
模块文档[创建]
您可能想要创建本Scribunto模块的文档。 编者可以在本模块的沙盒 (创建 | 镜像)和测试样例 (创建)页面进行实验。 请在/doc子页面中添加分类。本模块的子页面。 |
local p = {}
function p.dat(frame)
r = ""
i = 1
while frame.args[i] ~= nil do
s = os.date("*t")
if frame.args[i] ~= "0"
then
s["year"] = frame.args[i]
end
i = i + 1
s["month"] = frame.args[i]
i = i + 1
s["day"] = frame.args[i]
i = i + 1
t = os.time(s)
if t == os.time()
then
r = r .. frame.args[i]
end
i = i + 1
end
return r
end
return p