<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://the.satanic.wiki/index.php?action=history&amp;feed=atom&amp;title=Module%3AAsof</id>
	<title>Module:Asof - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://the.satanic.wiki/index.php?action=history&amp;feed=atom&amp;title=Module%3AAsof"/>
	<link rel="alternate" type="text/html" href="https://the.satanic.wiki/index.php?title=Module:Asof&amp;action=history"/>
	<updated>2026-04-20T01:21:18Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://the.satanic.wiki/index.php?title=Module:Asof&amp;diff=11084&amp;oldid=prev</id>
		<title>WikiGOD at 06:09, 2 May 2021</title>
		<link rel="alternate" type="text/html" href="https://the.satanic.wiki/index.php?title=Module:Asof&amp;diff=11084&amp;oldid=prev"/>
		<updated>2021-05-02T06:09:43Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 06:09, 2 May 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;-- &amp;lt;pre&amp;gt; Creates dated statements&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;-- &amp;lt;pre&amp;gt; Creates dated statements&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;local p = {}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;local p = {}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;local u = require(&quot;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Dev&lt;/del&gt;:Utility&quot;)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;local u = require(&quot;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Module&lt;/ins&gt;:Utility&quot;)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;local tValidMonths = {&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;local tValidMonths = {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	january = 1,&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	january = 1,&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key zzegtzyr_mw19226-mwjf_:diff:1.41:old-10862:rev-11084:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>WikiGOD</name></author>
	</entry>
	<entry>
		<id>https://the.satanic.wiki/index.php?title=Module:Asof&amp;diff=10862&amp;oldid=prev</id>
		<title>WikiGOD: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://the.satanic.wiki/index.php?title=Module:Asof&amp;diff=10862&amp;oldid=prev"/>
		<updated>2021-04-30T02:23:47Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 02:23, 30 April 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;4&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key zzegtzyr_mw19226-mwjf_:diff:1.41:old-10858:rev-10862 --&gt;
&lt;/table&gt;</summary>
		<author><name>WikiGOD</name></author>
	</entry>
	<entry>
		<id>https://the.satanic.wiki/index.php?title=Module:Asof&amp;diff=10858&amp;oldid=prev</id>
		<title>WikiGOD: Created page with &quot;-- &lt;pre&gt; Creates dated statements local p = {} local u = require(&quot;Dev:Utility&quot;) local tValidMonths = { 	january = 1, 	february = 2, 	march = 3, 	april = 4, 	may = 5, 	june = 6...&quot;</title>
		<link rel="alternate" type="text/html" href="https://the.satanic.wiki/index.php?title=Module:Asof&amp;diff=10858&amp;oldid=prev"/>
		<updated>2021-04-30T01:44:05Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;-- &amp;lt;pre&amp;gt; Creates dated statements local p = {} local u = require(&amp;quot;Dev:Utility&amp;quot;) local tValidMonths = { 	january = 1, 	february = 2, 	march = 3, 	april = 4, 	may = 5, 	june = 6...&amp;quot;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 01:44, 30 April 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;4&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key zzegtzyr_mw19226-mwjf_:diff:1.41:old-10861:rev-10858 --&gt;
&lt;/table&gt;</summary>
		<author><name>WikiGOD</name></author>
	</entry>
	<entry>
		<id>https://the.satanic.wiki/index.php?title=Module:Asof&amp;diff=10861&amp;oldid=prev</id>
		<title>Mediawiki&gt;Magiczocker01 at 09:05, 24 April 2021</title>
		<link rel="alternate" type="text/html" href="https://the.satanic.wiki/index.php?title=Module:Asof&amp;diff=10861&amp;oldid=prev"/>
		<updated>2021-04-24T09:05:04Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- &amp;lt;pre&amp;gt; Creates dated statements&lt;br /&gt;
local p = {}&lt;br /&gt;
local u = require(&amp;quot;Dev:Utility&amp;quot;)&lt;br /&gt;
local tValidMonths = {&lt;br /&gt;
	january = 1,&lt;br /&gt;
	february = 2,&lt;br /&gt;
	march = 3,&lt;br /&gt;
	april = 4,&lt;br /&gt;
	may = 5,&lt;br /&gt;
	june = 6,&lt;br /&gt;
	july = 7,&lt;br /&gt;
	august = 8,&lt;br /&gt;
	september = 9,&lt;br /&gt;
	october = 10,&lt;br /&gt;
	november = 11,&lt;br /&gt;
	december = 12,&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
--% Entry point Creates a dated statement and categorizes the page&lt;br /&gt;
--@ frame (table) A scribunto frame&lt;br /&gt;
--: (string) A string containing &amp;quot;As of&amp;quot;, and a category with the date&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	local tArgs = u.getArgs(frame)&lt;br /&gt;
	local sYear = tonumber(tArgs[1])&lt;br /&gt;
	local sMonth = string.lower(tArgs[2] or &amp;quot;&amp;quot;)&lt;br /&gt;
	local sDay = tonumber(tArgs[3])&lt;br /&gt;
	local lc = tArgs.lc&lt;br /&gt;
	local nocat = tArgs.nocat&lt;br /&gt;
	local prefix = lc and &amp;quot;as of &amp;quot; or &amp;quot;As of &amp;quot;&lt;br /&gt;
	local lang = mw.language.new(&amp;quot;en&amp;quot;)&lt;br /&gt;
	local sFormat = &amp;quot;Y&amp;quot;&lt;br /&gt;
	local isYear, isMonth, isDay = p.isValidDate(sYear, sMonth, sDay)&lt;br /&gt;
	&lt;br /&gt;
	if not isYear then &lt;br /&gt;
		return error(&amp;quot;Invalid date, year `&amp;quot; .. tostring(tArgs[1]) .. &amp;quot;` is wrong.&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if isMonth then&lt;br /&gt;
		sMonth = tonumber(sMonth) or tValidMonths[sMonth]&lt;br /&gt;
		sFormat = &amp;quot;F &amp;quot; .. sFormat&lt;br /&gt;
		if isDay then &lt;br /&gt;
			sFormat = &amp;quot;d &amp;quot; .. sFormat&lt;br /&gt;
		else&lt;br /&gt;
			sDay = os.date(&amp;quot;%d&amp;quot;)&lt;br /&gt;
		end&lt;br /&gt;
	else &lt;br /&gt;
		sDay = sDay or os.date(&amp;quot;%d&amp;quot;) &lt;br /&gt;
		sMonth = os.date(&amp;quot;%m&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local sDefOutput = prefix .. lang:formatDate(sFormat, sYear .. &amp;quot;/&amp;quot; .. sMonth .. &amp;quot;/&amp;quot; .. sDay)&lt;br /&gt;
	local sOutput = tArgs.alt or sDefOutput &lt;br /&gt;
	&lt;br /&gt;
	if not nocat then&lt;br /&gt;
		sOutput = sOutput .. &amp;quot; [[Category:Dated statements from &amp;quot; .. sYear .. &amp;quot;]]&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return sOutput&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--% Checks if the date is valid&lt;br /&gt;
--@ year (string) The required year&lt;br /&gt;
--@ month (string) The required month &lt;br /&gt;
--@ day (string) The required day&lt;br /&gt;
--: (boolean) True if valid year&lt;br /&gt;
--: (boolean) True if valid month&lt;br /&gt;
--: (boolean) True if valid day&lt;br /&gt;
function p.isValidDate(year, month, day)&lt;br /&gt;
	local tValidDays = {31, 28, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30}&lt;br /&gt;
	local bYear, bMonth, bDay&lt;br /&gt;
	&lt;br /&gt;
	month = tonumber(month) or string.lower(month)&lt;br /&gt;
	month = tonumber(month) or tValidMonths[month]&lt;br /&gt;
	mw.log(year)&lt;br /&gt;
	if tonumber(year) and tonumber(year) &amp;gt; -1 then&lt;br /&gt;
		if year % 4 == 0 and not (year % 100 == 0 and year % 400 &amp;gt; 0) then&lt;br /&gt;
			tValidDays[2] = 29&lt;br /&gt;
		end&lt;br /&gt;
		bYear = true&lt;br /&gt;
	end&lt;br /&gt;
	if tValidMonths[month] or tValidDays[month] then&lt;br /&gt;
		bMonth = true&lt;br /&gt;
		if tonumber(month) and tonumber(day) and&lt;br /&gt;
			0 &amp;lt; day and tValidDays[month] &amp;gt;= tonumber(day) then&lt;br /&gt;
			bDay = true&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return bYear, bMonth, bDay&lt;br /&gt;
end&lt;br /&gt;
-- end date functions&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Mediawiki&gt;Magiczocker01</name></author>
	</entry>
</feed>