<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3ATOCyears</id>
	<title>Module:TOCyears - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3ATOCyears"/>
	<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:TOCyears&amp;action=history"/>
	<updated>2026-04-11T12:30:53Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://stockhub.co/index.php?title=Module:TOCyears&amp;diff=147123&amp;oldid=prev</id>
		<title>imported&gt;Izno: rm hlist, unnecessary id</title>
		<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:TOCyears&amp;diff=147123&amp;oldid=prev"/>
		<updated>2021-10-28T20:49:00Z</updated>

		<summary type="html">&lt;p&gt;rm hlist, unnecessary id&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- This module implements [[Template:TOCyears]]&lt;br /&gt;
&lt;br /&gt;
local yesno = require(&amp;#039;Module:Yesno&amp;#039;)&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
function p._years(args)&lt;br /&gt;
	local i = tonumber(args.startyear) or 1900&lt;br /&gt;
	local endYear = tonumber(args.endyear) or tonumber(os.date(&amp;#039;%Y&amp;#039;))&lt;br /&gt;
	local range = tonumber(args.range)&lt;br /&gt;
	local step = tonumber(args.step) or 1&lt;br /&gt;
	local links = {}&lt;br /&gt;
	while i &amp;lt;= endYear do&lt;br /&gt;
		local year = tostring(i)&lt;br /&gt;
		if range then&lt;br /&gt;
			year = year .. &amp;#039;-&amp;#039; .. tostring(i + range)&lt;br /&gt;
		end&lt;br /&gt;
		links[#links + 1] = string.format(&amp;#039;[[#%s|%s]]&amp;#039;, year, year)&lt;br /&gt;
		i = i + step&lt;br /&gt;
	end&lt;br /&gt;
	if #links == 0 then&lt;br /&gt;
		return &amp;quot;&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
	links = &amp;#039;* &amp;#039; .. table.concat(links, &amp;#039; &amp;#039;)&lt;br /&gt;
	&lt;br /&gt;
	-- Root&lt;br /&gt;
	local root = mw.html.create()&lt;br /&gt;
	local isPrimary = yesno(args.primary) ~= false&lt;br /&gt;
	if isPrimary then&lt;br /&gt;
		root:wikitext(&amp;#039;__NOTOC__&amp;#039;)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Top div tag&lt;br /&gt;
	local top = root:tag(&amp;#039;div&amp;#039;)&lt;br /&gt;
	top:addClass(&amp;#039;toc plainlinks&amp;#039;)&lt;br /&gt;
	if isPrimary then&lt;br /&gt;
		top&lt;br /&gt;
			:attr(&amp;#039;id&amp;#039;, &amp;#039;toc&amp;#039;)&lt;br /&gt;
			:attr(&amp;#039;class&amp;#039;, &amp;#039;toc&amp;#039;)&lt;br /&gt;
	end&lt;br /&gt;
	local align = args.align and args.align:lower()&lt;br /&gt;
	if align == &amp;#039;left&amp;#039; then&lt;br /&gt;
		top&lt;br /&gt;
			:css(&amp;#039;float&amp;#039;, &amp;#039;left&amp;#039;)&lt;br /&gt;
			:css(&amp;#039;clear&amp;#039;, args.clear or &amp;#039;left&amp;#039;)&lt;br /&gt;
	elseif align == &amp;#039;right&amp;#039; then&lt;br /&gt;
		top&lt;br /&gt;
			:css(&amp;#039;float&amp;#039;, &amp;#039;right&amp;#039;)&lt;br /&gt;
			:css(&amp;#039;clear&amp;#039;, args.clear or &amp;#039;right&amp;#039;)&lt;br /&gt;
	elseif align == &amp;#039;center&amp;#039; then&lt;br /&gt;
		top&lt;br /&gt;
			:css(&amp;#039;margin&amp;#039;, &amp;#039;auto&amp;#039;)&lt;br /&gt;
			:css(&amp;#039;clear&amp;#039;, args.clear or &amp;#039;none&amp;#039;)&lt;br /&gt;
	else&lt;br /&gt;
		top&lt;br /&gt;
			:css(&amp;#039;clear&amp;#039;, args.clear or &amp;#039;left&amp;#039;)&lt;br /&gt;
	end&lt;br /&gt;
	top:newline()&lt;br /&gt;
&lt;br /&gt;
	-- Title div tag&lt;br /&gt;
	local title = args.title or mw.message.new(&amp;#039;Toc&amp;#039;):plain()&lt;br /&gt;
	local titleDiv = top:tag(&amp;#039;div&amp;#039;)&lt;br /&gt;
	titleDiv:attr(&amp;#039;class&amp;#039;, &amp;#039;toctitle&amp;#039;)&lt;br /&gt;
	if isPrimary then&lt;br /&gt;
		titleDiv:wikitext(&amp;#039;&amp;lt;h2&amp;gt;&amp;#039; .. title .. &amp;#039;&amp;lt;/h2&amp;gt;&amp;#039;)&lt;br /&gt;
	else&lt;br /&gt;
		titleDiv:tag(&amp;#039;strong&amp;#039;):wikitext(title)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	-- Content&lt;br /&gt;
	top&lt;br /&gt;
		:newline()&lt;br /&gt;
		:wikitext(links)&lt;br /&gt;
		:newline()&lt;br /&gt;
	&lt;br /&gt;
	return tostring(root)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.years(frame)&lt;br /&gt;
	local args = require(&amp;#039;Module:Arguments&amp;#039;).getArgs(frame, {&lt;br /&gt;
		wrappers = {&lt;br /&gt;
			&amp;#039;Template:TOCyears&amp;#039;,&lt;br /&gt;
		}&lt;br /&gt;
	})&lt;br /&gt;
	return p._years(args)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>imported&gt;Izno</name></author>
	</entry>
</feed>