Jump to content

Module:Systime: Difference between revisions

m
Fix module export.
(Implement 'toSystime'.)
 
m (Fix module export.)
Line 1: Line 1:
-- This module implements {{Systime}}.
-- This module implements {{Systime}}.


return function(year, month, day, hour, min, sec)
local p = {}
 
function p.toSystime(year, month, day, hour, min, sec)
time = os.time({year = year, month = month ~= nil and month or 1, day = day ~= nil and day or 1, hour = hour, min = min, sec = sec})
time = os.time({year = year, month = month ~= nil and month or 1, day = day ~= nil and day or 1, hour = hour, min = min, sec = sec})
date = os.date("*t", time)
date = os.date("*t", time)
Line 10: Line 12:
return year .. yday .. tdec
return year .. yday .. tdec
end
end
return p