<?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%3AGameLanding%2FLatest_news</id>
	<title>Module:GameLanding/Latest news - 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%3AGameLanding%2FLatest_news"/>
	<link rel="alternate" type="text/html" href="https://staging.twogpedia.com/index.php?title=Module:GameLanding/Latest_news&amp;action=history"/>
	<updated>2026-09-26T07:42:45Z</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:GameLanding/Latest_news&amp;diff=6225&amp;oldid=prev</id>
		<title>Couchor: Created page with &quot;local cargo = mw.ext.cargo local p = {} local prizeToString = require(&#039;Module:Functions&#039;).prizeToString  function p.news(game) 	local tables = &#039;News&#039; 	local fields = &#039;_pageName, date, game&#039; 	 	local cargoArgs = { 		where = &#039;game HOLDS &quot;&#039; .. game .. &#039;&quot;&#039;, 		orderBy = &#039;date DESC&#039;, 		limit = 10 	} 	local results = cargo.query(tables, fields, cargoArgs) 	 	if #results &gt; 0 then 		local list = &#039;&#039; 	 		for i = 1, #results do 			local result = results[i] 			local dateString = mw.u...&quot;</title>
		<link rel="alternate" type="text/html" href="https://staging.twogpedia.com/index.php?title=Module:GameLanding/Latest_news&amp;diff=6225&amp;oldid=prev"/>
		<updated>2023-09-29T11:30:43Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;local cargo = mw.ext.cargo local p = {} local prizeToString = require(&amp;#039;Module:Functions&amp;#039;).prizeToString  function p.news(game) 	local tables = &amp;#039;News&amp;#039; 	local fields = &amp;#039;_pageName, date, game&amp;#039; 	 	local cargoArgs = { 		where = &amp;#039;game HOLDS &amp;quot;&amp;#039; .. game .. &amp;#039;&amp;quot;&amp;#039;, 		orderBy = &amp;#039;date DESC&amp;#039;, 		limit = 10 	} 	local results = cargo.query(tables, fields, cargoArgs) 	 	if #results &amp;gt; 0 then 		local list = &amp;#039;&amp;#039; 	 		for i = 1, #results do 			local result = results[i] 			local dateString = mw.u...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local cargo = mw.ext.cargo&lt;br /&gt;
local p = {}&lt;br /&gt;
local prizeToString = require(&amp;#039;Module:Functions&amp;#039;).prizeToString&lt;br /&gt;
&lt;br /&gt;
function p.news(game)&lt;br /&gt;
	local tables = &amp;#039;News&amp;#039;&lt;br /&gt;
	local fields = &amp;#039;_pageName, date, game&amp;#039;&lt;br /&gt;
	&lt;br /&gt;
	local cargoArgs = {&lt;br /&gt;
		where = &amp;#039;game HOLDS &amp;quot;&amp;#039; .. game .. &amp;#039;&amp;quot;&amp;#039;,&lt;br /&gt;
		orderBy = &amp;#039;date DESC&amp;#039;,&lt;br /&gt;
		limit = 10&lt;br /&gt;
	}&lt;br /&gt;
	local results = cargo.query(tables, fields, cargoArgs)&lt;br /&gt;
	&lt;br /&gt;
	if #results &amp;gt; 0 then&lt;br /&gt;
		local list = &amp;#039;&amp;#039;&lt;br /&gt;
	&lt;br /&gt;
		for i = 1, #results do&lt;br /&gt;
			local result = results[i]&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 formattedDate = os.date(&amp;quot;%d %b %Y %H:%M&amp;quot;, os.time(dateTimeTable))&lt;br /&gt;
&lt;br /&gt;
			local news = mw.html.create(&amp;#039;div&amp;#039;):wikitext(formattedDate .. &amp;#039; - [[&amp;#039; .. result._pageName .. &amp;#039;]]&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
			list = list .. tostring(news)&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		local latestNews = mw.html.create(&amp;#039;div&amp;#039;):addClass(&amp;#039;box__container&amp;#039;):node(mw.html.create(&amp;#039;div&amp;#039;):addClass(&amp;#039;box__title&amp;#039;):wikitext(&amp;#039;Latest news&amp;#039;)):node(mw.html.create(&amp;#039;div&amp;#039;):addClass(&amp;#039;tc&amp;#039;):node(list))&lt;br /&gt;
		return latestNews&lt;br /&gt;
	end&lt;br /&gt;
	return nil&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Couchor</name></author>
	</entry>
</feed>