<?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_Egypt_era</id>
	<title>Module:Ancient Egypt era - 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_Egypt_era"/>
	<link rel="alternate" type="text/html" href="https://mywikibiz.com/index.php?title=Module:Ancient_Egypt_era&amp;action=history"/>
	<updated>2026-05-16T16:18:09Z</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_Egypt_era&amp;diff=470966&amp;oldid=prev</id>
		<title>Zoran: Moved page from wikipedia:en:Module:Ancient Egypt era</title>
		<link rel="alternate" type="text/html" href="https://mywikibiz.com/index.php?title=Module:Ancient_Egypt_era&amp;diff=470966&amp;oldid=prev"/>
		<updated>2021-07-08T19:17:05Z</updated>

		<summary type="html">&lt;p&gt;Moved page from &lt;a href=&quot;/index.php?title=Wikipedia:en:Module:Ancient_Egypt_era&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Wikipedia:en:Module:Ancient Egypt era (page does not exist)&quot;&gt;wikipedia:en:Module:Ancient Egypt era&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 Egypt era/data' )&lt;br /&gt;
local lang = mw.language.getContentLanguage()&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;
&lt;br /&gt;
	-- Find the length of the data.&lt;br /&gt;
	-- We need the length of the data so that we can loop through it backwards.&lt;br /&gt;
	-- Normally we can get the length of tables with the # operator, but this&lt;br /&gt;
	-- doesn't work with mw.loadData, as mw.loadData uses a metatable, and the&lt;br /&gt;
	-- # operator doesn't work for tables that use metatables.&lt;br /&gt;
	local dataLength = 0&lt;br /&gt;
	for i, t in ipairs( data ) do&lt;br /&gt;
		dataLength = i&lt;br /&gt;
	end&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 &amp;gt;= t.dynstart and inputYear - 1 &amp;lt;= t.dynend then&lt;br /&gt;
			-- year of the dynasty, 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;
			return string.format(&lt;br /&gt;
				'[[%s|%s]] [[List of ancient Egyptian dynasties|dynasty]], %d',&lt;br /&gt;
				t.dynlink, t.dynasty, inputYear - t.dynstart&lt;br /&gt;
			)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.main( frame )&lt;br /&gt;
	-- If you only want to run this module from another Lua module, you can get&lt;br /&gt;
	-- rid of this function entirely. This function is only used if you want to&lt;br /&gt;
	-- run this individual module from a template.&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>