<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.sasgaming.net/index.php?action=history&amp;feed=atom&amp;title=Template%3AMC%2FTime_ago%2Fdoc</id>
	<title>Template:MC/Time ago/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.sasgaming.net/index.php?action=history&amp;feed=atom&amp;title=Template%3AMC%2FTime_ago%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://wiki.sasgaming.net/index.php?title=Template:MC/Time_ago/doc&amp;action=history"/>
	<updated>2026-04-10T20:31:36Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://wiki.sasgaming.net/index.php?title=Template:MC/Time_ago/doc&amp;diff=46877&amp;oldid=prev</id>
		<title>imported&gt;Mitsos at 11:59, 18 January 2026</title>
		<link rel="alternate" type="text/html" href="https://wiki.sasgaming.net/index.php?title=Template:MC/Time_ago/doc&amp;diff=46877&amp;oldid=prev"/>
		<updated>2026-01-18T11:59:01Z</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;{{documentation header}}&lt;br /&gt;
&amp;lt;!-- Documentation here --&amp;gt;&lt;br /&gt;
{{lua}}&lt;br /&gt;
Displays the relative time between a given date and the current time (e.g. &amp;quot;3 days ago&amp;quot;, &amp;quot;2 months time&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
Displays the amount of time elapsed between a supplied date/time and the present moment in a human-readable format.&lt;br /&gt;
&lt;br /&gt;
=== Basic syntax ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;&lt;br /&gt;
{{Time ago|date}}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;&lt;br /&gt;
{{Time ago|2024-01-01}}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Produces:&lt;br /&gt;
{{Time ago|2024-01-01}}&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
=== Required ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Parameter !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; || Date or timestamp to compare with the current time. Must be parseable by MediaWiki.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Optional ===&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;magnitude&amp;lt;/code&amp;gt; ====&lt;br /&gt;
Forces the output to use a specific unit instead of automatic selection.&lt;br /&gt;
&lt;br /&gt;
Valid values:&lt;br /&gt;
* &amp;lt;code&amp;gt;seconds&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;minutes&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;hours&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;days&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;weeks&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;months&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;years&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;&lt;br /&gt;
{{Time ago|2024-01-01|magnitude=days}}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Produces:&lt;br /&gt;
{{Time ago|2024-01-01|magnitude=days}}&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;min_magnitude&amp;lt;/code&amp;gt; ====&lt;br /&gt;
Specifies the smallest unit of time that may be displayed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;&lt;br /&gt;
{{Time ago|2024-01-01|min_magnitude=days}}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This prevents results such as &amp;quot;12 hours ago&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;ago&amp;lt;/code&amp;gt; ====&lt;br /&gt;
Controls suffix text.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Value !! Result&lt;br /&gt;
|-&lt;br /&gt;
| (default) || &amp;lt;code&amp;gt;3 days ago&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;ago=&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;3 days&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;ago=since&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;3 days since&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;spellout&amp;lt;/code&amp;gt; ====&lt;br /&gt;
Controls whether numbers are written as words.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Value !! Behavior&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;no&amp;lt;/code&amp;gt; || Never spell numbers (default)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;auto&amp;lt;/code&amp;gt; || Spell numbers from 1–9&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;yes&amp;lt;/code&amp;gt; || Spell numbers from 1–100&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;&lt;br /&gt;
{{Time ago|yesterday|spellout=auto}}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Produces:&lt;br /&gt;
{{Time ago|yesterday|spellout=auto}}&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;spelloutmax&amp;lt;/code&amp;gt; ====&lt;br /&gt;
Sets an upper limit for spelled-out numbers. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;&lt;br /&gt;
{{Time ago|2020-01-01|spellout=yes|spelloutmax=5}}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, the date is {{Time ago|2020-01-01|spellout=yes|spelloutmax=5}}. Because the amount of years is larger than 5, it doesn&amp;#039;t spell it out.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;purge&amp;lt;/code&amp;gt; ====&lt;br /&gt;
Adds a purge link to the output to allow manual cache refresh.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;&lt;br /&gt;
{{Time ago|2024-01-01|purge=yes}}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Produces:&lt;br /&gt;
{{Time ago|2024-01-01|purge=yes}}&lt;br /&gt;
&lt;br /&gt;
== Future dates ==&lt;br /&gt;
Dates in the future are supported automatically.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;&lt;br /&gt;
{{Time ago|2030-01-01}}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Produces:&lt;br /&gt;
{{Time ago|2030-01-01}}&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;ago=&amp;lt;/code&amp;gt; is empty:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;&lt;br /&gt;
{{Time ago|2030-01-01|ago=}}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Produces:&lt;br /&gt;
{{Time ago|2030-01-01|ago=}}&lt;br /&gt;
&lt;br /&gt;
== Accepted date formats ==&lt;br /&gt;
The first parameter accepts any date format supported by MediaWiki, including:&lt;br /&gt;
* &amp;lt;code&amp;gt;YYYY-MM-DD&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;YYYY-MM-DD HH:MM&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;Month D, YYYY&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;yesterday&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;today&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;now&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Error handling ==&lt;br /&gt;
If the date cannot be parsed, the template displays:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Error: first parameter cannot be parsed as a date or time.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Unit selection ==&lt;br /&gt;
The template automatically selects a unit using the following thresholds:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Minimum elapsed time !! Unit used&lt;br /&gt;
|-&lt;br /&gt;
| ≥ 2 years || Years&lt;br /&gt;
|-&lt;br /&gt;
| ≥ 2 months || Months&lt;br /&gt;
|-&lt;br /&gt;
| ≥ 2 days || Days&lt;br /&gt;
|-&lt;br /&gt;
| ≥ 2 hours || Hours&lt;br /&gt;
|-&lt;br /&gt;
| ≥ 2 minutes || Minutes&lt;br /&gt;
|-&lt;br /&gt;
| Otherwise || Seconds&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;&lt;br /&gt;
&amp;lt;!-- Template categories/interwikis here --&amp;gt;&lt;br /&gt;
[[nl:Sjabloon:Tijd geleden]]&lt;br /&gt;
[[ru:Шаблон:Времени назад]]&lt;br /&gt;
[[th:แม่แบบ:Time ago]]&lt;br /&gt;
&amp;lt;/includeonly&amp;gt;&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&amp;lt;!-- Documentation categories/interwikis here --&amp;gt;&lt;br /&gt;
[[nl:Sjabloon:Tijd geleden/doc]]&lt;br /&gt;
[[ru:Шаблон:Времени назад/док]]&lt;br /&gt;
[[th:แม่แบบ:Time ago/doc]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>imported&gt;Mitsos</name></author>
	</entry>
</feed>