<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://staging.twogpedia.com/index.php?action=history&amp;feed=atom&amp;title=Module%3ANewsLanding%2FLatestNews%2FTop</id>
	<title>Module:NewsLanding/LatestNews/Top - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://staging.twogpedia.com/index.php?action=history&amp;feed=atom&amp;title=Module%3ANewsLanding%2FLatestNews%2FTop"/>
	<link rel="alternate" type="text/html" href="https://staging.twogpedia.com/index.php?title=Module:NewsLanding/LatestNews/Top&amp;action=history"/>
	<updated>2026-05-13T19:54:09Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://staging.twogpedia.com/index.php?title=Module:NewsLanding/LatestNews/Top&amp;diff=9232&amp;oldid=prev</id>
		<title>Couchor: Created page with &quot;local getArgs = require(&#039;Module:Arguments&#039;).getArgs local cargo = mw.ext.cargo  local p = {}  function p.main(frame) 	local args = getArgs(frame) 	local category = string.gsub(args.category, &#039;_&#039;, &#039; &#039;) 	local tables = &#039;News&#039; 	local fields = &#039;_pageName, date, image&#039; 	local cargoArgs = { 		where = &#039;category HOLDS WITHIN &quot;&#039; .. args.category .. &#039;&quot;&#039;, 		orderBy = &#039;date DESC&#039;, 		limit = 2, 	}  	local results = cargo.query(tables, fields, cargoArgs) 	 	local container = mw.html.c...&quot;</title>
		<link rel="alternate" type="text/html" href="https://staging.twogpedia.com/index.php?title=Module:NewsLanding/LatestNews/Top&amp;diff=9232&amp;oldid=prev"/>
		<updated>2024-02-12T14:39:09Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;local getArgs = require(&amp;#039;Module:Arguments&amp;#039;).getArgs local cargo = mw.ext.cargo  local p = {}  function p.main(frame) 	local args = getArgs(frame) 	local category = string.gsub(args.category, &amp;#039;_&amp;#039;, &amp;#039; &amp;#039;) 	local tables = &amp;#039;News&amp;#039; 	local fields = &amp;#039;_pageName, date, image&amp;#039; 	local cargoArgs = { 		where = &amp;#039;category HOLDS WITHIN &amp;quot;&amp;#039; .. args.category .. &amp;#039;&amp;quot;&amp;#039;, 		orderBy = &amp;#039;date DESC&amp;#039;, 		limit = 2, 	}  	local results = cargo.query(tables, fields, cargoArgs) 	 	local container = mw.html.c...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local getArgs = require(&amp;#039;Module:Arguments&amp;#039;).getArgs&lt;br /&gt;
local cargo = mw.ext.cargo&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	local args = getArgs(frame)&lt;br /&gt;
	local category = string.gsub(args.category, &amp;#039;_&amp;#039;, &amp;#039; &amp;#039;)&lt;br /&gt;
	local tables = &amp;#039;News&amp;#039;&lt;br /&gt;
	local fields = &amp;#039;_pageName, date, image&amp;#039;&lt;br /&gt;
	local cargoArgs = {&lt;br /&gt;
		where = &amp;#039;category HOLDS WITHIN &amp;quot;&amp;#039; .. args.category .. &amp;#039;&amp;quot;&amp;#039;,&lt;br /&gt;
		orderBy = &amp;#039;date DESC&amp;#039;,&lt;br /&gt;
		limit = 2,&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	local results = cargo.query(tables, fields, cargoArgs)&lt;br /&gt;
	&lt;br /&gt;
	local container = mw.html.create(&amp;#039;div&amp;#039;):attr(&amp;#039;id&amp;#039;, &amp;#039;news-cat-top&amp;#039;)&lt;br /&gt;
	&lt;br /&gt;
	if #results &amp;gt; 0 then&lt;br /&gt;
		for i = 1, #results do&lt;br /&gt;
			local result = results[i]&lt;br /&gt;
			&lt;br /&gt;
			local title = mw.html.create(&amp;#039;div&amp;#039;):addClass(&amp;#039;news-cat-title&amp;#039;):wikitext(mw.ext.displaytitle.get(result._pageName))&lt;br /&gt;
			local dateString = mw.ustring.gsub(result.date, &amp;quot;%s(AM|PM)$&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
			-- Use os.date to convert the string to a table of date and time components&lt;br /&gt;
			local dateTimeTable = os.date(&amp;quot;*t&amp;quot;, os.time({year=string.sub(dateString, 1, 4), month=string.sub(dateString, 6, 7), day=string.sub(dateString, 9, 10), hour=tonumber(string.sub(dateString, 12, 13)) + ((string.sub(dateString, 22, 22) == &amp;quot;PM&amp;quot;) and 12 or 0), min=string.sub(dateString, 15, 16), sec=string.sub(dateString, 18, 19)}))&lt;br /&gt;
			&lt;br /&gt;
			-- Use os.date again to format the date and time components into a desired format&lt;br /&gt;
			local formatedDate = os.date(&amp;quot;%d %b %Y %H:%M&amp;quot;, os.time(dateTimeTable))&lt;br /&gt;
			local date = mw.html.create(&amp;#039;div&amp;#039;):addClass(&amp;#039;news-cat-date&amp;#039;):wikitext(formatedDate)&lt;br /&gt;
			local info = mw.html.create(&amp;#039;div&amp;#039;):addClass(&amp;#039;news-cat-info&amp;#039;):node(title):node(date)&lt;br /&gt;
			local newsItem = mw.html.create(&amp;#039;div&amp;#039;):addClass(&amp;#039;news-cat-item&amp;#039;):wikitext(&amp;#039;[[File:&amp;#039;.. result.image .. &amp;#039;|link=&amp;#039; .. result._pageName .. &amp;#039;]]&amp;#039;):node(info)&lt;br /&gt;
			container:node(newsItem)&lt;br /&gt;
		end&lt;br /&gt;
		return container&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Couchor</name></author>
	</entry>
</feed>