<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://idle-pixel.wiki/index.php?action=history&amp;feed=atom&amp;title=Module%3AUtil</id>
	<title>Module:Util - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://idle-pixel.wiki/index.php?action=history&amp;feed=atom&amp;title=Module%3AUtil"/>
	<link rel="alternate" type="text/html" href="https://idle-pixel.wiki/index.php?title=Module:Util&amp;action=history"/>
	<updated>2026-04-26T02:04:07Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.2</generator>
	<entry>
		<id>https://idle-pixel.wiki/index.php?title=Module:Util&amp;diff=50822&amp;oldid=prev</id>
		<title>Dounford at 14:29, 14 April 2024</title>
		<link rel="alternate" type="text/html" href="https://idle-pixel.wiki/index.php?title=Module:Util&amp;diff=50822&amp;oldid=prev"/>
		<updated>2024-04-14T14:29:54Z</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 14:29, 14 April 2024&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-l64&quot;&gt;Line 64:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 64:&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 &amp;quot;rare&amp;quot;&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 &amp;quot;rare&amp;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;     else&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;     else&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 &quot;very&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;-rare&lt;/del&gt;&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;         return &quot;very&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;     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;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 idlepixe_mw19154-mw_:diff:1.41:old-49087:rev-50822:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Dounford</name></author>
	</entry>
	<entry>
		<id>https://idle-pixel.wiki/index.php?title=Module:Util&amp;diff=49087&amp;oldid=prev</id>
		<title>Dounford: Created page with &quot;local p = {}   function p.d(time)     if not time or time == 0 or time == '' then         return ''     end     result = ''     seconds = tonumber(time) % 60     if seconds == 1 then         result = '1 second'     elseif seconds ~= 0 then         result = seconds .. ' seconds'     end     time = (time - time % 60) / 60     minutes = time % 60     if result:len() and minutes ~= 0 then         result = ' ' .. result     end     if minutes == 1 then         result = '1 min...&quot;</title>
		<link rel="alternate" type="text/html" href="https://idle-pixel.wiki/index.php?title=Module:Util&amp;diff=49087&amp;oldid=prev"/>
		<updated>2023-11-30T09:10:51Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;local p = {}   function p.d(time)     if not time or time == 0 or time == &amp;#039;&amp;#039; then         return &amp;#039;&amp;#039;     end     result = &amp;#039;&amp;#039;     seconds = tonumber(time) % 60     if seconds == 1 then         result = &amp;#039;1 second&amp;#039;     elseif seconds ~= 0 then         result = seconds .. &amp;#039; seconds&amp;#039;     end     time = (time - time % 60) / 60     minutes = time % 60     if result:len() and minutes ~= 0 then         result = &amp;#039; &amp;#039; .. result     end     if minutes == 1 then         result = &amp;#039;1 min...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local p = {}&lt;br /&gt;
 &lt;br /&gt;
function p.d(time)&lt;br /&gt;
    if not time or time == 0 or time == '' then&lt;br /&gt;
        return ''&lt;br /&gt;
    end&lt;br /&gt;
    result = ''&lt;br /&gt;
    seconds = tonumber(time) % 60&lt;br /&gt;
    if seconds == 1 then&lt;br /&gt;
        result = '1 second'&lt;br /&gt;
    elseif seconds ~= 0 then&lt;br /&gt;
        result = seconds .. ' seconds'&lt;br /&gt;
    end&lt;br /&gt;
    time = (time - time % 60) / 60&lt;br /&gt;
    minutes = time % 60&lt;br /&gt;
    if result:len() and minutes ~= 0 then&lt;br /&gt;
        result = ' ' .. result&lt;br /&gt;
    end&lt;br /&gt;
    if minutes == 1 then&lt;br /&gt;
        result = '1 minute' .. result&lt;br /&gt;
    elseif minutes ~= 0 then&lt;br /&gt;
        result = minutes .. ' minutes' .. result&lt;br /&gt;
    end&lt;br /&gt;
    time = (time - time % 60) / 60&lt;br /&gt;
    total_hours = time&lt;br /&gt;
    hours = time % 24&lt;br /&gt;
    if result:len() and hours ~= 0 then&lt;br /&gt;
        result = ' ' .. result&lt;br /&gt;
    end&lt;br /&gt;
    days = (time - time % 24) / 24&lt;br /&gt;
    result_2 = result&lt;br /&gt;
    if total_hours == 1 then&lt;br /&gt;
        result_2 = '1 hour' .. result_2&lt;br /&gt;
    elseif total_hours ~= 0 then&lt;br /&gt;
        result_2 = total_hours .. ' hours' .. result_2&lt;br /&gt;
    end&lt;br /&gt;
    if hours == 1 then&lt;br /&gt;
        result = '1 hour' .. result&lt;br /&gt;
    elseif hours ~= 0 then&lt;br /&gt;
        result = hours .. ' hours' .. result&lt;br /&gt;
    end&lt;br /&gt;
    if days == 0 then&lt;br /&gt;
        return result_2&lt;br /&gt;
    elseif days == 1 then&lt;br /&gt;
        return result_2 .. '&amp;lt;br /&amp;gt;(' .. '1 day ' .. result .. ')'&lt;br /&gt;
    else&lt;br /&gt;
        return result_2 .. '&amp;lt;br /&amp;gt;(' .. days .. ' days ' .. result .. ')'&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
 &lt;br /&gt;
function p.fd(frame)&lt;br /&gt;
    return p.d(frame.args[1])&lt;br /&gt;
end&lt;br /&gt;
 &lt;br /&gt;
function p.r(inverse_rarity)&lt;br /&gt;
    inverse_rarity = tonumber(inverse_rarity)&lt;br /&gt;
    if inverse_rarity == 1 then&lt;br /&gt;
        return &amp;quot;always&amp;quot;&lt;br /&gt;
    elseif inverse_rarity &amp;lt; 12 then&lt;br /&gt;
        return &amp;quot;common&amp;quot;&lt;br /&gt;
    elseif inverse_rarity &amp;lt; 32 then&lt;br /&gt;
        return &amp;quot;uncommon&amp;quot;&lt;br /&gt;
    elseif inverse_rarity &amp;lt; 62 then&lt;br /&gt;
        return &amp;quot;rare&amp;quot;&lt;br /&gt;
    else&lt;br /&gt;
        return &amp;quot;very-rare&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
 &lt;br /&gt;
function p.c(number)&lt;br /&gt;
    local result = tostring(number), k&lt;br /&gt;
    while true do&lt;br /&gt;
        result, k = result:gsub(&amp;quot;^(-?%d+)(%d%d%d)&amp;quot;, '%1,%2')&lt;br /&gt;
        if k == 0 then&lt;br /&gt;
            break&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    return result&lt;br /&gt;
end&lt;br /&gt;
 &lt;br /&gt;
function p.fc(frame)&lt;br /&gt;
    return p.c(frame.args[1])&lt;br /&gt;
end&lt;br /&gt;
 &lt;br /&gt;
function p.pp(frame)&lt;br /&gt;
    return frame:preprocess(frame.args[1])&lt;br /&gt;
end&lt;br /&gt;
 &lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Dounford</name></author>
	</entry>
</feed>