More languages
More actions
m (Further development. Testing capture of year, month and day) |
m (Added statement for debugging) |
||
Line 13: | Line 13: | ||
local initialDate = pframe.args[1] | local initialDate = pframe.args[1] | ||
end | end | ||
return "initialDate: " .. initialDate | |||
return " | |||
end | end | ||
-- local year,month,day = string.match(initialDate, '(%d+)-(%d+)-(%d+)') | |||
-- return "Year: " .. year .. ", Month: " .. month .. ", Day: " .. day | |||
-- end | |||
return p | return p |
Revision as of 14:49, 3 September 2022
local p = {}
function p.age( frame )
local pframe = frame:getParent()
local arg1 = pframe.args[1]
local arg2 = pframe.args[2]
local arg3 = pframe.args[3]
if arg1 == "1" or arg1 == "2" or arg1 == "3" then
local initialDate = pframe.args[2]
else
local initialDate = pframe.args[1]
end
return "initialDate: " .. initialDate
end
-- local year,month,day = string.match(initialDate, '(%d+)-(%d+)-(%d+)')
-- return "Year: " .. year .. ", Month: " .. month .. ", Day: " .. day
-- end
return p