Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Module:Test: Difference between revisions

From ProleWiki, the proletarian encyclopedia
m (More testing)
m (Test function)
Line 1: Line 1:
local p = {}
local p = {}
function p.test(frame)
function p.date(frame)
local args = frame:getParent().args
local Date = os.date()
local num = {}
local hour = Date:match("(%d+):%d+:%d+")
for k,v in pairs(args) do
local minute = Date:match("%d+:(%d+):%d+")
local temnum = k:match('^parameter(%d+)$')
local second = Date:match("%d+:%d+:(%d+)")
if temnum then table.insert(num, tonumber(temnum))
return hour .. ":" .. minute .. ":" .. second
end
return __tostring(num)
end
end
end
return p
return p

Revision as of 22:31, 5 October 2022

local p = {}
function p.date(frame)
	local Date = os.date()
	local hour = Date:match("(%d+):%d+:%d+")
	local minute = Date:match("%d+:(%d+):%d+")
	local second = Date:match("%d+:%d+:(%d+)")
	return hour .. ":" .. minute .. ":" .. second 
end
return p