local p = {}
local cat = '[[Categoria:Pubblicazioni antecedenti al 2009 con template FIMI da spostare]]'
function p.main(frame)
local year = tonumber(frame:getParent().args.anno)
if not year or year > 2008 then return end
local content = mw.title.getCurrentTitle():getContent()
local awards = { "d'oro", "di platino", "di diamante" }
for _, v in ipairs(awards) do
if string.match(content, '|%s*numero dischi ' .. v .. '%s*=[^|}]*{{%s*[Cc]ertificazione disco%s*|[^}]*{{%s*FIMI%s*|') then
return cat
end
end
end
return p