<?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%3ASandbox%2FGonnym%2Fsometest5%2F2</id>
	<title>Module:Sandbox/Gonnym/sometest5/2 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3ASandbox%2FGonnym%2Fsometest5%2F2"/>
	<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Sandbox/Gonnym/sometest5/2&amp;action=history"/>
	<updated>2026-07-27T02:20:34Z</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:Sandbox/Gonnym/sometest5/2&amp;diff=145488&amp;oldid=prev</id>
		<title>imported&gt;Gonnym at 12:30, 20 August 2020</title>
		<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Sandbox/Gonnym/sometest5/2&amp;diff=145488&amp;oldid=prev"/>
		<updated>2020-08-20T12:30:58Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;--[[&lt;br /&gt;
A category layout is as follows (not all items appear in all categories):&lt;br /&gt;
- Poratls&lt;br /&gt;
- &amp;quot;Container category&amp;quot; template&lt;br /&gt;
- Hatnotes&lt;br /&gt;
- Header text&lt;br /&gt;
- Navigation template&lt;br /&gt;
]]--&lt;br /&gt;
&lt;br /&gt;
local getOrdinal = require(&amp;#039;Module:Ordinal&amp;#039;)._ordinal&lt;br /&gt;
&lt;br /&gt;
local ERROR_CATEGORY = &amp;quot;[[Category:Errors reported by television chronology category header templates]]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
local navigationTemplates = {&lt;br /&gt;
	[&amp;quot;year&amp;quot;] = &amp;quot;Navseasoncats with decades below year/sandbox&amp;quot;,&lt;br /&gt;
	[&amp;quot;decade&amp;quot;] = &amp;quot;Navseasoncats with centuries below decade/sandbox&amp;quot;,&lt;br /&gt;
	[&amp;quot;century&amp;quot;] = &amp;quot;Navseasoncats&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
p.errorMessagePrefixList = {&lt;br /&gt;
	[&amp;quot;NOT_ON_CATEGORY&amp;quot;] = &amp;quot;This page is not a category!&amp;lt;br /&amp;gt;&amp;quot;,&lt;br /&gt;
	[&amp;quot;INVALID_PAGE_NAME&amp;quot;] = &amp;quot;Invalid page name.&amp;lt;br /&amp;gt;&amp;quot;,&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function p.isOnCategory(pageName)&lt;br /&gt;
	if (pageName.nsText == &amp;#039;Category&amp;#039;) then&lt;br /&gt;
		return true&lt;br /&gt;
	else&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.getPortals(frame, portal_categories, timePeriod)&lt;br /&gt;
	table.insert(portal_categories, frame:expandTemplate{title = &amp;quot;FindYDCportal&amp;quot;, args = {timePeriod}})&lt;br /&gt;
	return frame:expandTemplate{title = &amp;quot;Portal&amp;quot;, args = portalArgs}&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.getContainerCategoryTemplate(frame)&lt;br /&gt;
	frame:expandTemplate{title = &amp;quot;Container category&amp;quot;}&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.getCatMainTemplate(frame, title)&lt;br /&gt;
	if (mw.title.makeTitle(0, title).exists) then&lt;br /&gt;
		return frame:expandTemplate{title = &amp;quot;Cat main&amp;quot;, args = {title}}&lt;br /&gt;
	else&lt;br /&gt;
		return &amp;quot;&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.getNavigationTemplate(frame, categoryHeader)&lt;br /&gt;
	return frame:expandTemplate{title = navigationTemplates[categoryHeader.type]}&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.getError(errorPrefix, errorMessageText)&lt;br /&gt;
	local errorMessageText = errorPrefix .. errorMessageText&lt;br /&gt;
    local errorMessage = tostring(mw.html.create(&amp;#039;strong&amp;#039;)&lt;br /&gt;
        :addClass(&amp;#039;error&amp;#039;)&lt;br /&gt;
        :wikitext(errorMessageText)&lt;br /&gt;
        )&lt;br /&gt;
    &lt;br /&gt;
    return errorMessage .. ERROR_CATEGORY&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.getMillennium(century)&lt;br /&gt;
	century = tonumber(century)&lt;br /&gt;
	&lt;br /&gt;
	-- Need a more complete solution if this will be used with fictional categories.&lt;br /&gt;
	if (century &amp;gt; 9) then&lt;br /&gt;
		century = century * 100&lt;br /&gt;
	end&lt;br /&gt;
	local millennium = math.floor((math.abs(century) - 1) / 1000) + 1&lt;br /&gt;
	millennium = getOrdinal(millennium) .. &amp;quot; millennium&amp;quot;&lt;br /&gt;
	if (century &amp;lt; 0) then&lt;br /&gt;
		millennium = millennium .. &amp;quot; BC&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return millennium&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.getCentury(decade)&lt;br /&gt;
	decade = tonumber(decade)&lt;br /&gt;
	local century = ((decade - 1) / 100) + 1&lt;br /&gt;
	if (decade &amp;lt; -1) then&lt;br /&gt;
		century = century - 1&lt;br /&gt;
	end&lt;br /&gt;
	century = math.floor(century)&lt;br /&gt;
	return getOrdinal(century) .. &amp;quot; century&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.getDecade(year)&lt;br /&gt;
	year = tonumber(year)&lt;br /&gt;
	local decade = year / 10&lt;br /&gt;
	decade = math.floor(decade)&lt;br /&gt;
	decade = decade .. &amp;quot;0s&amp;quot;&lt;br /&gt;
	return decade&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.getNextTierTimePeroid(categoryHeader, timePeriod)&lt;br /&gt;
	if (categoryHeader.type == &amp;quot;year&amp;quot;) then&lt;br /&gt;
		return p.getDecade(timePeriod)&lt;br /&gt;
	elseif (categoryHeader.type == &amp;quot;decade&amp;quot;) then&lt;br /&gt;
		return p.getCentury(timePeriod)&lt;br /&gt;
	elseif (categoryHeader.type == &amp;quot;century&amp;quot;) then&lt;br /&gt;
		return p.getMillennium(timePeriod)&lt;br /&gt;
	end	&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>imported&gt;Gonnym</name></author>
	</entry>
</feed>