Module:Timeline of release years: Difference between revisions

Content deleted Content added
Undid revision 671815847 by CAS222222221 (talk)
No edit summary
Line 63:
-- Main module code goes here.
local ret
local firstyear, lastyear, TBA
TBA = isYearReleased(args, 'TBA')
ret = mw.html.create( 'table' )
:css('float', args.align or 'right')
Line 91 ⟶ 92:
if tonumber(args.last) then
lastyear = tonumber(args.last)
elseif TBA then
for i = os.date('%Y') + 3, os.date('%Y'), -1 do
if isYearReleased(args, i) then
lastyear = i
break
else
lastyear = os.date('%Y')
end
end
else
for i = os.date('%Y') + 3, firstyear, -1 do
Line 104 ⟶ 114:
end
if isYearReleased(args, 'TBA') then
row(ret, args, 'TBA')
end