m
Fix module export.
Fireheart& (talk | contribs) (Implement 'toSystime'.) |
Fireheart& (talk | contribs) m (Fix module export.) |
||
Line 1: | Line 1: | ||
-- This module implements {{Systime}}. | -- This module implements {{Systime}}. | ||
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 |