Module:Team appearances list: Difference between revisions

Content deleted Content added
Only show 1 in the future
Add FEI World Equestrian Games
Line 1:
-- This module implements [[Template:Team appearances list]].
-- [SublimeLinter luacheck-globals:mw]
 
local p = {}
Line 14 ⟶ 15:
1934, 1938, 1946, 1950, 1954, 1958, 1962, 1966, 1969, 1971, 1974, 1978,
1982, 1986, 1990, 1994, 1998, 2002, 2006, 2010, 2012, 2014, 2016},
["FEI World Equestrian Games"] = {
1990, 1994, 1998, 2002, 2006, 2010, 2014, 2018},
["Mediterranean Games"] = {
1951, 1955, 1959, 1963, 1967, 1971, 1975, 1979, 1983, 1987, 1991, 1993,
Line 39 ⟶ 42:
local absences = {}
for _, v in pairs(compressSparseArray(args)) do
absences[mw.ustringstring.sub(v, 1, 4)] = mw.getCurrentFrame():expandTemplate{
title='Gray', args={v}}
end
Line 49 ⟶ 52:
absences[y] = nil
else
table.insert(appearances, mw.ustringstring.format(
'[[%s at the %s %s|%s]]', args.team, y, args.competition, y))
end