Module:Team appearances list: Difference between revisions

Content deleted Content added
update from sandbox - make future years italicized - see Special:PermaLink/794880094#Italics
update from Module:Team appearances list/sandbox with minor tweaks
Line 172:
local hlist = require('Module:List').horizontal
local competitions, absent_years, absent_ranges = competition_information(args)
local current_year = 2017 -- Storing the current year so that years in the future are in italtonumber(os.date('!%Y'))
local function is_absent(y)
if absent_years[y] then
Line 203:
end
if y then
iflocal ydisplay <= current_year thentostring(y)
if y > current_year then
table.insert(appearances, string.format(
display = '<i>'[[%s at.. thedisplay %d.. %s|%d]]',</i>'
args.team, y, args.competition, y
))
else
table.insert(appearances, string.format(
'\'\'[[%s at the %d %s|%d]]\'\'',
args.team, y, args.competition, y
))
end
table.insert(appearances, string.format(
'\'\'[[%s at the %d %s|%ds]]\'\'',
args.team, y, args.competition, ydisplay
))
end
end