Module:Era

local p = {}

local eraData = mw.loadData( 'Module:Era/data' )

local function trim( s, charset ) if s == nil then return '' end charset = charset or '\t\r\n\f ' s = mw.ustring.gsub( s, '^[' .. charset .. ']*(.-)[' .. charset .. ']*$', '%1' ) return s end

function p.era( frame ) local era = trim( frame.args[1] ) local eraName = eraData[string.lower( era )] if eraName ~= nil then return eraName end return era end

return p