Module:Season

local Season = {} -- This module handles formatting of seasons display in infoboxes, via the Template:Season

-- Current number of seasons (changing it should automatically add/remove seasons to the display) local seasoncount = 3

-- Fonction d'affichage des icônes à appeler function Season.display(frame) local stringBuilder = "" for i = 1, seasoncount do found = false for _, code in ipairs(frame.args) do  if tonumber(code)==i then -- If the season number is present in the arguments stringBuilder = stringBuilder .. "S"..i.."" found = true break end end if not found then stringBuilder = stringBuilder .. " S"..i.." " end if i~=seasoncount then stringBuilder = stringBuilder .. " - " end end

return stringBuilder end

return Season