<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://moasspedia.org/w/index.php?action=history&amp;feed=atom&amp;title=Module%3AIATA_and_ICAO_code%2Fsandbox2</id>
	<title>Module:IATA and ICAO code/sandbox2 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://moasspedia.org/w/index.php?action=history&amp;feed=atom&amp;title=Module%3AIATA_and_ICAO_code%2Fsandbox2"/>
	<link rel="alternate" type="text/html" href="https://moasspedia.org/w/index.php?title=Module:IATA_and_ICAO_code/sandbox2&amp;action=history"/>
	<updated>2026-04-19T20:17:22Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.37.2</generator>
	<entry>
		<id>https://moasspedia.org/w/index.php?title=Module:IATA_and_ICAO_code/sandbox2&amp;diff=1419&amp;oldid=prev</id>
		<title>Wikipedia&gt;Bouzinac: ←Created page with &#039;require(&#039;Module:No globals&#039;); local p = {}  local airportLink local master = mw.loadData(&quot;Module:IATA and ICAO code/data/sandbox2&quot;)  local IATA_airport = master....&#039;</title>
		<link rel="alternate" type="text/html" href="https://moasspedia.org/w/index.php?title=Module:IATA_and_ICAO_code/sandbox2&amp;diff=1419&amp;oldid=prev"/>
		<updated>2018-06-12T13:24:52Z</updated>

		<summary type="html">&lt;p&gt;&lt;a href=&quot;/w/index.php?title=WP:AES&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;WP:AES (page does not exist)&quot;&gt;←&lt;/a&gt;Created page with &amp;#039;require(&amp;#039;Module:No globals&amp;#039;); local p = {}  local airportLink local master = mw.loadData(&amp;quot;Module:IATA and ICAO code/data/sandbox2&amp;quot;)  local IATA_airport = master....&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;require(&amp;#039;Module:No globals&amp;#039;);&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
local airportLink&lt;br /&gt;
local master = mw.loadData(&amp;quot;Module:IATA and ICAO code/data/sandbox2&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
local IATA_airport = master.IATA&lt;br /&gt;
local ICAO_airport = master.ICAO&lt;br /&gt;
local wikilink_label = master.WikiName&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
local code = mw.text.trim(frame.args[1] or &amp;#039;&amp;#039;):upper()&lt;br /&gt;
--exemple of data { &amp;#039;AAA&amp;#039;, &amp;#039;NTGA&amp;#039;, &amp;#039;Anaa Airport&amp;#039;, &amp;#039;Anaa&amp;#039; },&lt;br /&gt;
&lt;br /&gt;
	if 3 ~= #code and 4 ~= #code then											--accepts only three-letter codes (IATA) and 4-letter codes (ICAO)&lt;br /&gt;
		return table.concat ({&amp;#039;&amp;lt;span style=\&amp;quot;font-size:100%; font-style:normal;\&amp;quot; class=\&amp;quot;error\&amp;quot;&amp;gt;error: invalid code: &amp;#039;, code, &amp;#039;, must be an ICAO or IATA code&amp;lt;/span&amp;gt;&amp;#039;});&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if IATA_airport[code] then&lt;br /&gt;
		airportLink= table.concat ({&amp;#039;[[&amp;#039;, IATA_airport[code], &amp;#039;|&amp;#039;, wikilink_label[code], &amp;#039;]]&amp;#039;})	-- make wikilink from iata code&lt;br /&gt;
	elseif ICAO_airport[code] then&lt;br /&gt;
		airportLink = table.concat ({&amp;#039;[[&amp;#039;, ICAO_airport[code], &amp;#039;|&amp;#039;, wikilink_label[code], &amp;#039;]]&amp;#039;})	-- make wikilink from icao code&lt;br /&gt;
	else&lt;br /&gt;
		airportLink = table.concat ({&amp;#039;&amp;lt;span style=\&amp;quot;font-size:100%; font-style:normal;\&amp;quot; class=\&amp;quot;error\&amp;quot;&amp;gt;error: data missing for code: &amp;lt;b&amp;gt;&amp;#039;, code, &amp;#039;&amp;lt;/b&amp;gt;&amp;lt;/span&amp;gt;&amp;#039;});&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return airportLink&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Wikipedia&gt;Bouzinac</name></author>
	</entry>
</feed>