-- This module implements
local yesno = require('Module:Yesno')local p =
function p._years(args) local i = tonumber(args.startyear) or 1900 local endYear = tonumber(args.endyear) or tonumber(os.date('%Y')) local range = tonumber(args.range) local step = tonumber(args.step) or 1 local links = while i <= endYear do local year = tostring(i) if range then year = year .. '-' .. tostring(i + range) end links[#links + 1] = string.format('%s', year, year) i = i + step end if #links
-- Top div tag local top = root:tag('div') top:addClass('toc plainlinks') if isPrimary then top :attr('id', 'toc') :attr('class', 'toc') end local align = args.align and args.align:lower if align
'right' then top :css('float', 'right') :css('clear', args.clear or 'right') elseif align
-- Title div tag local title = args.title or mw.message.new('Toc'):plain local titleDiv = top:tag('div') titleDiv:attr('class', 'toctitle') if isPrimary then titleDiv:wikitext('
function p.years(frame) local args = require('Module:Arguments').getArgs(frame,) return p._years(args)end
return p