<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://mywikibiz.com/index.php?action=history&amp;feed=atom&amp;title=Module%3AAncient_Olympiads</id>
	<title>Module:Ancient Olympiads - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://mywikibiz.com/index.php?action=history&amp;feed=atom&amp;title=Module%3AAncient_Olympiads"/>
	<link rel="alternate" type="text/html" href="https://mywikibiz.com/index.php?title=Module:Ancient_Olympiads&amp;action=history"/>
	<updated>2026-06-16T02:39:21Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.3</generator>
	<entry>
		<id>https://mywikibiz.com/index.php?title=Module:Ancient_Olympiads&amp;diff=470980&amp;oldid=prev</id>
		<title>Zoran: Moved page from wikipedia:en:Module:Ancient Olympiads</title>
		<link rel="alternate" type="text/html" href="https://mywikibiz.com/index.php?title=Module:Ancient_Olympiads&amp;diff=470980&amp;oldid=prev"/>
		<updated>2021-07-08T19:17:46Z</updated>

		<summary type="html">&lt;p&gt;Moved page from &lt;a href=&quot;/index.php?title=Wikipedia:en:Module:Ancient_Olympiads&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Wikipedia:en:Module:Ancient Olympiads (page does not exist)&quot;&gt;wikipedia:en:Module:Ancient Olympiads&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local data = mw.loadData( 'Module:Ancient Olympiads/data' )&lt;br /&gt;
local lang = mw.language.getContentLanguage()&lt;br /&gt;
local TableTools = require('Module:TableTools')&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
function p._main( inputYear )&lt;br /&gt;
	-- Convert the input to an integer if possible. Return &amp;quot;N/A&amp;quot; if the input could&lt;br /&gt;
	-- not be converted, or if the converted input is too big or too small.&lt;br /&gt;
	inputYear = tonumber( inputYear )&lt;br /&gt;
	if not inputYear or inputYear &amp;gt; tonumber( lang:formatDate( 'Y' ) ) then&lt;br /&gt;
		return &amp;quot;''N/A''&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
	local dataLength = TableTools.length(data)&lt;br /&gt;
&lt;br /&gt;
	-- Find the year in the data page and display the output.&lt;br /&gt;
	for i = dataLength, 1, -1 do&lt;br /&gt;
		local t = data[i]&lt;br /&gt;
		if inputYear - 1 == t.year then&lt;br /&gt;
			-- year of the Olympiad, test with = p._main( -495 )&lt;br /&gt;
			-- The input year in the calendar is one after the expected (-775 for the year 776 BC). This is why all values need to be corrected by 1. &lt;br /&gt;
			-- Year of Olympiad creates autolink to same page, therefore eliminated here&lt;br /&gt;
			return string.format(&lt;br /&gt;
				'%s [[Olympiad]] ([[%s|victor]][[Winner of the Stadion race|)¹]]',&lt;br /&gt;
				t.numberOl, t.winner&lt;br /&gt;
			)&lt;br /&gt;
		end&lt;br /&gt;
        if inputYear &amp;gt; t.year then&lt;br /&gt;
			-- Years 2-4 of the Olympiad, test with = p._main( -494 )  etc.&lt;br /&gt;
			-- It would be nice, if the string could be as follows:&lt;br /&gt;
			-- '[[%s]] [[Olympiad]], [[%d BC|year %d]]',&lt;br /&gt;
			-- t.numberOl, inputYear * - 1 + 1, inputYear - t.year&lt;br /&gt;
			-- but unfortunately it links to the very same page and won't be displayed as a link but in bold.&lt;br /&gt;
			return string.format(&lt;br /&gt;
				'[[%s|%s]] [[Olympiad]], year %d',&lt;br /&gt;
				t.yearBC, t.numberOl, inputYear - t.year &lt;br /&gt;
			)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- If input year is before 776 BC (-775), the year of the first Olympiad.&lt;br /&gt;
	return string.format(&lt;br /&gt;
		'%d before [[776 BC|1st]] [[Olympiad]]',&lt;br /&gt;
		inputYear * -1 - 775&lt;br /&gt;
	)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.main( frame )&lt;br /&gt;
	local args = require( 'Module:Arguments' ).getArgs( frame, {&lt;br /&gt;
		parentOnly = true&lt;br /&gt;
	} )&lt;br /&gt;
	return p._main( args[ 1 ] )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Zoran</name></author>
	</entry>
</feed>