Module:Guidance: Difference between revisions

Jump to navigation Jump to search
no edit summary
imported>Pingu
No edit summary
imported>Pingu
No edit summary
Line 97: Line 97:
end
end
return rc
return rc
end
-- Function for the smaller "guidance detail" notices (under testing)
function p.details(frame)
for i = ri,1,-1
do
-- Timestamp parsing
if string.match(frame.args[1],r[i][1]..'%([%d,:-]*%)') then
rs = string.match(frame.args[1],r[i][1]..'%([%d,:-]*%)')
rt = string.match(rs,'%([%d,:-]*%)')
mw.log(rt)
if string.match(rt,"-") then
rt = string.gsub(rt,'%('," (from ")
rt = string.gsub(rt,"-"," to ")
else
rt = string.gsub(rt,'%('," (at ")
end
mw.log(rt)
rs = r[i][2]..rt
elseif string.find(frame.args[1],r[i][1]) then
rs = r[i][2].." (for the whole duration)"
end
if rd == nil then
rd = rs
else
rd = rs.." and "..rd
end
end
return rd
end
end


return p
return p
Anonymous user

Navigation menu