Difference between revisions of "Module:YearStrip"
Jump to navigation
Jump to search
James Hare (talk | contribs) (Working) |
James Hare (talk | contribs) (Working) |
||
Line 2: | Line 2: | ||
function p.YearStrip(pagename) |
function p.YearStrip(pagename) |
||
− | local output = string.gsub(pagename.args[ |
+ | local output = string.gsub(pagename.args[1], "[0-9][0-9][0-9][0-9]%/", "", 1) |
return output |
return output |
||
end |
end |
Latest revision as of 08:18, 30 January 2015
Documentation for this module may be created at Module:YearStrip/doc
local p = { }
function p.YearStrip(pagename)
local output = string.gsub(pagename.args[1], "[0-9][0-9][0-9][0-9]%/", "", 1)
return output
end
return p