Module:Sandbox/Ahecht/trim date

local p = {}

function p.trim(frame) local date = frame:getParent.args[1] if date == nil then date = frame.args[1] end if date == nil then date = "123" end date = string.gsub( date, "%lt;", "<" ) date = string.gsub( date, "%gt;", ">" ) date = string.gsub( date, "\'\"`", "<" )	date = string.gsub( date, "\`\"'", ">" ) date = string.gsub( date, "<.-mw%-formatted%-date.->", "" ) date = string.gsub( date, "<.-nowiki.->", "" ) date = string.gsub( date, "<.*>", "" ) return date end

return p