<?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%3AUtility</id>
	<title>Module:Utility - 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%3AUtility"/>
	<link rel="alternate" type="text/html" href="https://the.satanic.wiki/index.php?title=Module:Utility&amp;action=history"/>
	<updated>2026-04-20T01:23:45Z</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:Utility&amp;diff=11086&amp;oldid=prev</id>
		<title>WikiGOD at 06:10, 2 May 2021</title>
		<link rel="alternate" type="text/html" href="https://the.satanic.wiki/index.php?title=Module:Utility&amp;diff=11086&amp;oldid=prev"/>
		<updated>2021-05-02T06:10:40Z</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:10, 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-l164&quot;&gt;Line 164:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 164:&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;--: (string) A printed lua table&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;--: (string) A printed lua table&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;function p.table_print (tablename)&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;function p.table_print (tablename)&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;     return require(&quot;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Dev&lt;/del&gt;:Inspect&quot;).inspect(tablename)&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;     return require(&quot;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Module&lt;/ins&gt;:Inspect&quot;).inspect(tablename)&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;end&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;end&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;--% Gets debug information for a function  using lua xpcall&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;--% Gets debug information for a function  using lua xpcall&lt;/div&gt;&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-l192&quot;&gt;Line 192:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 192:&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;--: (string) Prints out nowiki of first argument&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;--: (string) Prints out nowiki of first argument&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;function p.nowiki (frame)&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;function p.nowiki (frame)&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 args = require(&quot;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Dev&lt;/del&gt;:Arguments&quot;).getArgs(frame)&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 args = require(&quot;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Module&lt;/ins&gt;:Arguments&quot;).getArgs(frame)&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;     return mw.text.nowiki (args[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;     return mw.text.nowiki (args[1] )&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;end&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;end&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key zzegtzyr_mw19226-mwjf_:diff:1.41:old-10970:rev-11086:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>WikiGOD</name></author>
	</entry>
	<entry>
		<id>https://the.satanic.wiki/index.php?title=Module:Utility&amp;diff=10970&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:Utility&amp;diff=10970&amp;oldid=prev"/>
		<updated>2021-04-30T02:24:05Z</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:24, 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-10969:rev-10970 --&gt;
&lt;/table&gt;</summary>
		<author><name>WikiGOD</name></author>
	</entry>
	<entry>
		<id>https://the.satanic.wiki/index.php?title=Module:Utility&amp;diff=10969&amp;oldid=prev</id>
		<title>Mediawiki&gt;Puxlit: Reverted edits by 8nml (talk) to last version by ShadeTempest to debug &lt;https://discordapp.com/channels/246075715714416641/246084444941844481/720267669835612160&gt;</title>
		<link rel="alternate" type="text/html" href="https://the.satanic.wiki/index.php?title=Module:Utility&amp;diff=10969&amp;oldid=prev"/>
		<updated>2020-06-10T13:37:46Z</updated>

		<summary type="html">&lt;p&gt;Reverted edits by &lt;a href=&quot;/index.php/Special:Contributions/8nml&quot; title=&quot;Special:Contributions/8nml&quot;&gt;8nml&lt;/a&gt; (&lt;a href=&quot;/index.php?title=User_talk:8nml&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;User talk:8nml (page does not exist)&quot;&gt;talk&lt;/a&gt;) to last version by ShadeTempest to debug &amp;lt;https://discordapp.com/channels/246075715714416641/246084444941844481/720267669835612160&amp;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; //&lt;br /&gt;
--| A library with many miscellaneous functions&lt;br /&gt;
p = {}&lt;br /&gt;
&lt;br /&gt;
--% Put all arguments into a real table - Returns Parent, child args table&lt;br /&gt;
--@ frame (table) A frame object&lt;br /&gt;
--@ targetArgs (string) the target arguments to return, possible values (&amp;quot;parent&amp;quot;, &amp;quot;child&amp;quot;, &amp;quot;both&amp;quot;&lt;br /&gt;
--: (table) A table containing arguments&lt;br /&gt;
function p.getArgs(frame, targetArgs)&lt;br /&gt;
    if frame and type(frame)==&amp;quot;table&amp;quot; then&lt;br /&gt;
        local tParent = frame:getParent()&lt;br /&gt;
        local tChild = p.fetchArgs(frame.args or nil)&lt;br /&gt;
        &lt;br /&gt;
        if frame   then&lt;br /&gt;
            tParent = p.fetchArgs(tParent.args or nil)&lt;br /&gt;
        end&lt;br /&gt;
        &lt;br /&gt;
        if targetArgs ==&amp;quot;parent&amp;quot; then&lt;br /&gt;
            return tParent&lt;br /&gt;
        elseif targetArgs ==&amp;quot;child&amp;quot; then&lt;br /&gt;
            return tChild&lt;br /&gt;
        elseif targetArgs ==&amp;quot;both&amp;quot; then&lt;br /&gt;
            return tParent, tChild&lt;br /&gt;
        end&lt;br /&gt;
        &lt;br /&gt;
        return tParent or tChild&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
--% This is meant to fetch a args table&lt;br /&gt;
--@ tTmp (table) The template args from the module {{#invoke&lt;br /&gt;
--: (table) A table containing arguments  or nil&lt;br /&gt;
function p.fetchArgs(tTmp)&lt;br /&gt;
    if not(tTmp) then &lt;br /&gt;
        return &lt;br /&gt;
    end&lt;br /&gt;
    for name, value in  pairs( tTmp ) do&lt;br /&gt;
        if(name) then&lt;br /&gt;
            -- This is meant to avoid a read-only meta-table with no table functions&lt;br /&gt;
            return mw.clone(tTmp)&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--% Check if args are enough for script to run&lt;br /&gt;
--@ frame (table) Scribunto frame object&lt;br /&gt;
--@ iArgs (number) Number of arguments required to run checkArgs&lt;br /&gt;
--@ bParent (boolean) Checks parent (true) or child arguments &lt;br /&gt;
--: (boolean) True if args are enough for script to run&lt;br /&gt;
function p.checkArgs(frame, iArgs, bParent)&lt;br /&gt;
    local iCount =0&lt;br /&gt;
    local  tParent, tChild = p.getArgs(frame)&lt;br /&gt;
    local tArgTable = tParent&lt;br /&gt;
&lt;br /&gt;
    if not(bParent) then&lt;br /&gt;
        tArgTable = tChild&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    for name, value in  pairs(tArgTable) do &lt;br /&gt;
        iCount = iCount + 1&lt;br /&gt;
        if (iCount) == tonumber(iArgs) then  &lt;br /&gt;
            return true      &lt;br /&gt;
        end      &lt;br /&gt;
    end&lt;br /&gt;
    return false&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--% Add days to date&lt;br /&gt;
--@ sDate (string) Date string e.g. 2012-01-02, YYYY-MM-DD&lt;br /&gt;
--@ iDays (number) Number of days to add or subtract (negative or positive)&lt;br /&gt;
--@ bReturnTable (boolean) Set to true to returns a lua date table&lt;br /&gt;
--@ sFormat (string) specific format for date &lt;br /&gt;
--: (string) A calculated date&lt;br /&gt;
function p.addDays(sDate,iDays,bReturnTable, sFormat)&lt;br /&gt;
    if p.checkdate(sDate) and iDays and tonumber(iDays) then&lt;br /&gt;
        local iDayToSecs = iDays  * 24 * 60 *60&lt;br /&gt;
        &lt;br /&gt;
        if (bReturnTable) then&lt;br /&gt;
            return os.date(&amp;quot;*t&amp;quot;,p.getdate(sDate,sFormat) + iDayToSecs)&lt;br /&gt;
        end&lt;br /&gt;
        &lt;br /&gt;
        return os.date(&amp;quot;%Y-%m-%d&amp;quot;,p.getdate(sDate,sFormat) + iDayToSecs)&lt;br /&gt;
    end&lt;br /&gt;
    return sDate&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--% Check if date is in appropriate format --Iso YYYY-MM-DD&lt;br /&gt;
--@ sDate (string) Date string e.g. 2012-01-02, YYYY-MM-DD&lt;br /&gt;
--@ sPat (string) A lua pattern for a date, default is (%d%d%d%d)-(%d%d)-(%d%d)&lt;br /&gt;
--: (boolean) True for valid date&lt;br /&gt;
&lt;br /&gt;
function p.checkdate(sDate, sPat)&lt;br /&gt;
    if sDate then&lt;br /&gt;
        local sPat = sPat or &amp;quot;(%d%d%d%d)-(%d%d)-(%d%d)&amp;quot;&lt;br /&gt;
        local year, month, day = sDate:match(sPat)&lt;br /&gt;
        &lt;br /&gt;
        if year and month and day then &lt;br /&gt;
            return true&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    return false&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--% Check if table is empty&lt;br /&gt;
--@ tTab (table) A valid table&lt;br /&gt;
--: (boolean) true for empty&lt;br /&gt;
function p.isempty(tTab)&lt;br /&gt;
    if next(tTab) == nil then&lt;br /&gt;
        return true&lt;br /&gt;
    end&lt;br /&gt;
    return false&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--% Round a number&lt;br /&gt;
--@ num (number) A number&lt;br /&gt;
--@ idp (number) Decimal points&lt;br /&gt;
--: (number) Rounded number &lt;br /&gt;
&lt;br /&gt;
function p.round(num, idp)&lt;br /&gt;
    return tonumber(string.format(&amp;quot;%.&amp;quot; .. (idp or 0) .. &amp;quot;f&amp;quot;, num))&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--% Calculate difference between two dates&lt;br /&gt;
--@ sDate1 (string) A string containing a date&lt;br /&gt;
--@ sDate2 (string) A string containing a date&lt;br /&gt;
--@ isAbsolute (boolean) absolute number (no negatives)&lt;br /&gt;
--: (number) Difference between days number or null&lt;br /&gt;
function p.datediff( sDate1, sDate2, isAbsolute)&lt;br /&gt;
    if p.checkdate(sDate1) and p.checkdate(sDate2) then&lt;br /&gt;
        sDate1 = string.sub(sDate1,0,10)&lt;br /&gt;
        sDate2 = string.sub(sDate2,0,10)&lt;br /&gt;
        local tDate1 =p.getdate(sDate1)&lt;br /&gt;
        local tDate2 =p.getdate(sDate2)&lt;br /&gt;
        local iDays = (os.difftime(tDate1,tDate2))/3600/24&lt;br /&gt;
        &lt;br /&gt;
        if isAbsolute then&lt;br /&gt;
            iDays = math.abs(iDays)&lt;br /&gt;
        end&lt;br /&gt;
        return iDays&lt;br /&gt;
    end&lt;br /&gt;
    -- return 0&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--% Get lua timestamp (os.time) using custom format&lt;br /&gt;
--@ sDate (string) A string containing a date&lt;br /&gt;
--@ sPat (string) A lua pattern, default: &amp;quot;(%d%d%d%d)-(%d%d)-(%d%d)&amp;quot;&lt;br /&gt;
--: (table) Lua os.time&lt;br /&gt;
function p.getdate(sDate,sPat)&lt;br /&gt;
    if not(sDate) then &lt;br /&gt;
        sDate = os.date(&amp;quot;%Y-%m-%d&amp;quot;) &lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    local sPat=sPat or &amp;quot;(%d%d%d%d)-(%d%d)-(%d%d)&amp;quot;&lt;br /&gt;
    local year,month,day=sDate:match(sPat)&lt;br /&gt;
    local tDate &lt;br /&gt;
    &lt;br /&gt;
    if year and month and day then&lt;br /&gt;
       tDate = os.time({month=month,year=year,day=day}) &lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    return tDate&lt;br /&gt;
end&lt;br /&gt;
--% Get a printed table&lt;br /&gt;
--@ tablename (table) A simple lua table&lt;br /&gt;
--: (string) A printed lua table&lt;br /&gt;
function p.table_print (tablename)&lt;br /&gt;
    return require(&amp;quot;Dev:Inspect&amp;quot;).inspect(tablename)&lt;br /&gt;
end&lt;br /&gt;
--% Gets debug information for a function  using lua xpcall&lt;br /&gt;
--@ oFunc (function) A function to debug&lt;br /&gt;
--@ bShowErr (boolean) True to show error&lt;br /&gt;
--: (string) A stacktrace containing error details&lt;br /&gt;
function p.debug(oFunc, bShowErr)&lt;br /&gt;
     local bStatus, bResults = xpcall(oFunc, debug.traceback)&lt;br /&gt;
     &lt;br /&gt;
     if (not(bShowErr) or bStatus) then&lt;br /&gt;
        return bResults&lt;br /&gt;
     end&lt;br /&gt;
end&lt;br /&gt;
--% Gets variable content &lt;br /&gt;
--@ oData (variable) A variable to output information (e.g. a table {})&lt;br /&gt;
--: (string) Prints out variable content&lt;br /&gt;
function p.log(oData)&lt;br /&gt;
    local sOutput = oData&lt;br /&gt;
    if type(oData)==&amp;quot;table&amp;quot; then&lt;br /&gt;
        sOutput = p.table_print(oData,4) &lt;br /&gt;
    end&lt;br /&gt;
    mw.log(sOutput)&lt;br /&gt;
    return sOutput&lt;br /&gt;
end&lt;br /&gt;
--% Performs a nowiki on content. Same as using mw.text.nowiki on the first argument.&lt;br /&gt;
--@ frame (table) Scribunto frame&lt;br /&gt;
--: (string) Prints out nowiki of first argument&lt;br /&gt;
function p.nowiki (frame)&lt;br /&gt;
    local args = require(&amp;quot;Dev:Arguments&amp;quot;).getArgs(frame)&lt;br /&gt;
    return mw.text.nowiki (args[1] )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;br /&gt;
-- [[Category:Lua modules]]&lt;/div&gt;</summary>
		<author><name>Mediawiki&gt;Puxlit</name></author>
	</entry>
</feed>