<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh">
	<id>https://zybkcn.com/w/index.php?action=history&amp;feed=atom&amp;title=Module%3ATimeAgo</id>
	<title>Module:TimeAgo - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="https://zybkcn.com/w/index.php?action=history&amp;feed=atom&amp;title=Module%3ATimeAgo"/>
	<link rel="alternate" type="text/html" href="https://zybkcn.com/w/index.php?title=Module:TimeAgo&amp;action=history"/>
	<updated>2026-05-04T17:03:09Z</updated>
	<subtitle>本wiki上该页面的版本历史</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://zybkcn.com/w/index.php?title=Module:TimeAgo&amp;diff=26124&amp;oldid=prev</id>
		<title>2022年11月30日 (三) 14:28 入我相思门</title>
		<link rel="alternate" type="text/html" href="https://zybkcn.com/w/index.php?title=Module:TimeAgo&amp;diff=26124&amp;oldid=prev"/>
		<updated>2022-11-30T14:28: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;zh&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;←上一版本&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2022年11月30日 (三) 22:28的版本&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-l19&quot;&gt;第19行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第19行：&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;timeUnits = {&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;timeUnits = {&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;	[1] = { &amp;#039;秒&amp;#039;, &amp;#039;秒&amp;#039;, &amp;quot;秒&amp;quot;, &amp;quot;秒&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;	[1] = { &amp;#039;秒&amp;#039;, &amp;#039;秒&amp;#039;, &amp;quot;秒&amp;quot;, &amp;quot;秒&amp;quot; },&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;	[60] = { &#039;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;分鐘&lt;/del&gt;&#039;, &#039;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;分鐘&lt;/del&gt;&#039;, &quot;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;分鐘&lt;/del&gt;&quot;, &quot;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;分鐘&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;	[60] = { &#039;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;分钟&lt;/ins&gt;&#039;, &#039;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;分钟&lt;/ins&gt;&#039;, &quot;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;分钟&lt;/ins&gt;&quot;, &quot;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;分钟&lt;/ins&gt;&quot; },&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;	[3600] = { &#039;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;小時&lt;/del&gt;&#039;, &#039;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;小時&lt;/del&gt;&#039;, &quot;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;小時&lt;/del&gt;&quot;, &quot;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;小時&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;	[3600] = { &#039;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;小时&lt;/ins&gt;&#039;, &#039;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;小时&lt;/ins&gt;&#039;, &quot;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;小时&lt;/ins&gt;&quot;, &quot;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;小时&lt;/ins&gt;&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;	[86400] = { &amp;#039;天&amp;#039;, &amp;#039;天&amp;#039;, &amp;quot;天&amp;quot;, &amp;quot;天&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;	[86400] = { &amp;#039;天&amp;#039;, &amp;#039;天&amp;#039;, &amp;quot;天&amp;quot;, &amp;quot;天&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;	[604800] = { &amp;#039;周&amp;#039;, &amp;#039;周&amp;#039;, &amp;quot;周&amp;quot;, &amp;quot;周&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;	[604800] = { &amp;#039;周&amp;#039;, &amp;#039;周&amp;#039;, &amp;quot;周&amp;quot;, &amp;quot;周&amp;quot; },&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;	[2678400] = { &#039;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;個月&lt;/del&gt;&#039;, &#039;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;個月&lt;/del&gt;&#039;, &quot;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;個月&lt;/del&gt;&quot;, &quot;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;個月&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;	[2678400] = { &#039;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;个月&lt;/ins&gt;&#039;, &#039;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;个月&lt;/ins&gt;&#039;, &quot;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;个月&lt;/ins&gt;&quot;, &quot;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;个月&lt;/ins&gt;&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;	[31557600] = { &amp;#039;年&amp;#039;, &amp;#039;年&amp;#039;, &amp;quot;年&amp;quot;, &amp;quot;年&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;	[31557600] = { &amp;#039;年&amp;#039;, &amp;#039;年&amp;#039;, &amp;quot;年&amp;quot;, &amp;quot;年&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;}&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;}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key zybkcn_com:diff:1.41:old-26123:rev-26124:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>入我相思门</name></author>
	</entry>
	<entry>
		<id>https://zybkcn.com/w/index.php?title=Module:TimeAgo&amp;diff=26123&amp;oldid=prev</id>
		<title>入我相思门：​创建页面，内容为“-- Replacement for Template:Time ago local numberSpell = require(&#039;Module:NumberSpell&#039;)._main local yesno = require(&#039;Module:Yesno&#039;)  local p = {}  -- Table to convert entered text values to numeric values. timeText = { 	[&#039;seconds&#039;] = 1, 	[&#039;minutes&#039;] = 60, 	[&#039;hours&#039;] = 3600, 	[&#039;days&#039;] = 86400, 	[&#039;weeks&#039;] = 604800, 	[&#039;months&#039;] = 2678400, 	[&#039;years&#039;] = 31557600 }  -- Table containing tables of possible units to use in output. timeUnits = { 	[1] = { &#039;秒&#039;, &#039;秒&#039;,…”</title>
		<link rel="alternate" type="text/html" href="https://zybkcn.com/w/index.php?title=Module:TimeAgo&amp;diff=26123&amp;oldid=prev"/>
		<updated>2022-11-30T14:27:40Z</updated>

		<summary type="html">&lt;p&gt;创建页面，内容为“-- Replacement for &lt;a href=&quot;/wiki/Template:Time_ago&quot; title=&quot;Template:Time ago&quot;&gt;Template:Time ago&lt;/a&gt; local numberSpell = require(&amp;#039;Module:NumberSpell&amp;#039;)._main local yesno = require(&amp;#039;Module:Yesno&amp;#039;)  local p = {}  -- Table to convert entered text values to numeric values. timeText = { 	[&amp;#039;seconds&amp;#039;] = 1, 	[&amp;#039;minutes&amp;#039;] = 60, 	[&amp;#039;hours&amp;#039;] = 3600, 	[&amp;#039;days&amp;#039;] = 86400, 	[&amp;#039;weeks&amp;#039;] = 604800, 	[&amp;#039;months&amp;#039;] = 2678400, 	[&amp;#039;years&amp;#039;] = 31557600 }  -- Table containing tables of possible units to use in output. timeUnits = { 	[1] = { &amp;#039;秒&amp;#039;, &amp;#039;秒&amp;#039;,…”&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- Replacement for [[Template:Time ago]]&lt;br /&gt;
local numberSpell = require(&amp;#039;Module:NumberSpell&amp;#039;)._main&lt;br /&gt;
local yesno = require(&amp;#039;Module:Yesno&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
-- Table to convert entered text values to numeric values.&lt;br /&gt;
timeText = {&lt;br /&gt;
	[&amp;#039;seconds&amp;#039;] = 1,&lt;br /&gt;
	[&amp;#039;minutes&amp;#039;] = 60,&lt;br /&gt;
	[&amp;#039;hours&amp;#039;] = 3600,&lt;br /&gt;
	[&amp;#039;days&amp;#039;] = 86400,&lt;br /&gt;
	[&amp;#039;weeks&amp;#039;] = 604800,&lt;br /&gt;
	[&amp;#039;months&amp;#039;] = 2678400,&lt;br /&gt;
	[&amp;#039;years&amp;#039;] = 31557600&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
-- Table containing tables of possible units to use in output.&lt;br /&gt;
timeUnits = {&lt;br /&gt;
	[1] = { &amp;#039;秒&amp;#039;, &amp;#039;秒&amp;#039;, &amp;quot;秒&amp;quot;, &amp;quot;秒&amp;quot; },&lt;br /&gt;
	[60] = { &amp;#039;分鐘&amp;#039;, &amp;#039;分鐘&amp;#039;, &amp;quot;分鐘&amp;quot;, &amp;quot;分鐘&amp;quot; },&lt;br /&gt;
	[3600] = { &amp;#039;小時&amp;#039;, &amp;#039;小時&amp;#039;, &amp;quot;小時&amp;quot;, &amp;quot;小時&amp;quot; },&lt;br /&gt;
	[86400] = { &amp;#039;天&amp;#039;, &amp;#039;天&amp;#039;, &amp;quot;天&amp;quot;, &amp;quot;天&amp;quot; },&lt;br /&gt;
	[604800] = { &amp;#039;周&amp;#039;, &amp;#039;周&amp;#039;, &amp;quot;周&amp;quot;, &amp;quot;周&amp;quot; },&lt;br /&gt;
	[2678400] = { &amp;#039;個月&amp;#039;, &amp;#039;個月&amp;#039;, &amp;quot;個月&amp;quot;, &amp;quot;個月&amp;quot; },&lt;br /&gt;
	[31557600] = { &amp;#039;年&amp;#039;, &amp;#039;年&amp;#039;, &amp;quot;年&amp;quot;, &amp;quot;年&amp;quot; }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function p._main( args )&lt;br /&gt;
	-- Initialize variables&lt;br /&gt;
	local lang = mw.language.getContentLanguage()&lt;br /&gt;
	local auto_magnitude_num&lt;br /&gt;
	local min_magnitude_num&lt;br /&gt;
	local result&lt;br /&gt;
	local result_unit&lt;br /&gt;
	local magnitude = args.magnitude&lt;br /&gt;
	local min_magnitude = args.min_magnitude&lt;br /&gt;
	local purge = args.purge&lt;br /&gt;
	local spell_out = args.spellout&lt;br /&gt;
	local spell_out_max = args.spelloutmax&lt;br /&gt;
	&lt;br /&gt;
	-- Add a purge link if something (usually &amp;quot;yes&amp;quot;) is entered into the purge parameter&lt;br /&gt;
	if purge then&lt;br /&gt;
		purge = &amp;#039;&amp;amp;#x200B;&amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;（[&amp;#039; .. mw.title.getCurrentTitle():fullUrl(&amp;#039;action=purge&amp;#039;) .. &amp;#039; 更新]）&amp;lt;/span&amp;gt;&amp;#039;&lt;br /&gt;
	else&lt;br /&gt;
		purge = &amp;#039;&amp;#039;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Check that the entered timestamp is valid. If it isn&amp;#039;t, then give an error message.&lt;br /&gt;
	local noError, inputTime = pcall( lang.formatDate, lang, &amp;#039;U&amp;#039;, args[1], true )&lt;br /&gt;
	if not noError then&lt;br /&gt;
		return &amp;#039;&amp;lt;strong class=&amp;quot;error&amp;quot;&amp;gt;错误：第一个参数不能被解析为日期或时间。&amp;lt;/strong&amp;gt;&amp;#039;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Store the difference between the current time and the inputted time, as well as its absolute value.&lt;br /&gt;
	local timeDiff = lang:formatDate( &amp;#039;U&amp;#039;, nil, true ) - inputTime&lt;br /&gt;
	local absTimeDiff = math.abs( timeDiff )&lt;br /&gt;
&lt;br /&gt;
	if magnitude then&lt;br /&gt;
		auto_magnitude_num = 0&lt;br /&gt;
		min_magnitude_num = timeText[magnitude]&lt;br /&gt;
	else&lt;br /&gt;
		-- Calculate the appropriate unit of time if it was not specified as an argument.&lt;br /&gt;
		local autoMagnitudeData = {&lt;br /&gt;
			{ denom = 63115200, amn = 31557600 },&lt;br /&gt;
			{ denom = 5356800, amn = 2678400 },&lt;br /&gt;
			{ denom = 172800, amn = 86400 },&lt;br /&gt;
			{ denom = 7200, amn = 3600 },&lt;br /&gt;
			{ denom = 120, amn = 60 }&lt;br /&gt;
		}&lt;br /&gt;
		for i, t in ipairs( autoMagnitudeData ) do&lt;br /&gt;
			if absTimeDiff / t.denom &amp;gt;= 1 then&lt;br /&gt;
				auto_magnitude_num = t.amn&lt;br /&gt;
				break&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		auto_magnitude_num = auto_magnitude_num or 1&lt;br /&gt;
		if min_magnitude then&lt;br /&gt;
			min_magnitude_num = timeText[min_magnitude]&lt;br /&gt;
		else&lt;br /&gt;
			min_magnitude_num = -1&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if not min_magnitude_num then&lt;br /&gt;
		-- Default to seconds if an invalid magnitude is entered.&lt;br /&gt;
		min_magnitude_num = 1&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local magnitude_num = math.max( min_magnitude_num, auto_magnitude_num )&lt;br /&gt;
	local result_num = math.floor ( absTimeDiff / magnitude_num )&lt;br /&gt;
&lt;br /&gt;
	local punctuation_key, suffix&lt;br /&gt;
	if timeDiff &amp;gt;= 0 then -- Past&lt;br /&gt;
		if result_num == 1 then&lt;br /&gt;
			punctuation_key = 1&lt;br /&gt;
		else&lt;br /&gt;
			punctuation_key = 2&lt;br /&gt;
		end&lt;br /&gt;
		if args.ago == &amp;#039;&amp;#039; then&lt;br /&gt;
			suffix = &amp;#039;&amp;#039;&lt;br /&gt;
		else&lt;br /&gt;
			suffix = &amp;#039;&amp;#039; .. (args.ago or &amp;#039;前&amp;#039;)&lt;br /&gt;
		end&lt;br /&gt;
	else -- Future&lt;br /&gt;
		if args.ago == &amp;#039;&amp;#039; then&lt;br /&gt;
			suffix = &amp;#039;&amp;#039;&lt;br /&gt;
			if result_num == 1 then&lt;br /&gt;
				punctuation_key = 1&lt;br /&gt;
			else&lt;br /&gt;
				punctuation_key = 2&lt;br /&gt;
			end&lt;br /&gt;
		else&lt;br /&gt;
			suffix = &amp;#039;&amp;lt;!-- time--&amp;gt;&amp;#039;&lt;br /&gt;
			if result_num == 1 then&lt;br /&gt;
				punctuation_key = 3&lt;br /&gt;
			else&lt;br /&gt;
				punctuation_key = 4&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	result_unit = timeUnits[ magnitude_num ][ punctuation_key ]&lt;br /&gt;
&lt;br /&gt;
	-- Convert numerals to words if appropriate.&lt;br /&gt;
	spell_out_max = tonumber( spell_out_max ) -- Would cause script errors if not a number.&lt;br /&gt;
	local result_num_text&lt;br /&gt;
	if ( spell_out == &amp;#039;auto&amp;#039; and 1 &amp;lt;= result_num and result_num &amp;lt;= 9 and result_num &amp;lt;= ( spell_out_max or 9 ) )&lt;br /&gt;
		or ( yesno( spell_out ) and 1 &amp;lt;= result_num and result_num &amp;lt;= 100 and result_num &amp;lt;= ( spell_out_max or 100 ) )&lt;br /&gt;
	then&lt;br /&gt;
		result_num_text = numberSpell( result_num )&lt;br /&gt;
	else&lt;br /&gt;
		result_num_text = tostring( result_num )&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	result = result_num_text .. &amp;#039;&amp;#039; .. result_unit .. suffix -- Spaces for suffix have been added in earlier.&lt;br /&gt;
	return result .. purge&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.main( frame )&lt;br /&gt;
	local args = require( &amp;#039;Module:Arguments&amp;#039; ).getArgs( frame, {&lt;br /&gt;
		valueFunc = function( k, v )&lt;br /&gt;
			if v then&lt;br /&gt;
				v = v:match( &amp;#039;^%s*(.-)%s*$&amp;#039; ) -- Trim whitespace.&lt;br /&gt;
				if k == &amp;#039;ago&amp;#039; or v ~= &amp;#039;&amp;#039; then&lt;br /&gt;
					return v&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
			return nil&lt;br /&gt;
		end,&lt;br /&gt;
		wrappers = &amp;#039;Template:Time ago&amp;#039;&lt;br /&gt;
	})&lt;br /&gt;
	return p._main( args )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>入我相思门</name></author>
	</entry>
</feed>