Difference between revisions of "Module:YearStrip"
Jump to navigation
Jump to search
James Hare (talk | contribs) (Created page with "local p = { } function p.YearStrip(pagename) local output = string.gsub(pagename, "[0-9][0-9][0-9][0-9]%/", nil) return output end return p") |
James Hare (talk | contribs) (Working) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
function p.YearStrip(pagename) |
function p.YearStrip(pagename) |
||
− | local output = string.gsub(pagename, "[0-9][0-9][0-9][0-9]%/", |
+ | 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