Template:Time ago/doc: Difference between revisions
| [checked revision] | [checked revision] |
Content deleted Content added
Caleb Cooper (talk | contribs) Created page with "{{Documentation subpage}} {{high-use}} {{lua|Module:Time ago}} {{Commons Import}} <!-- Categories go at the bottom of this page and interwikis go in Wikidata. --> The '''T..." |
Caleb Cooper (talk | contribs) |
||
| (3 intermediate revisions by the same user not shown) | |||
Line 9:
The '''Time ago''' template calculates the amount of time which has passed since a provided timestamp. The result is a string similar to one of the examples below. This template ''should not'' be used with "subst" unless you don't want the stamp to change as the user refreshes the page.
Note that due to Wikipedia's caching mechanisms, you may need to [[Wikipedia:WP:PURGE|purge]] a page using this template to update the dynamic value. See the section [[#Purge|Purge]] below.
The result is rounded down. "Month" is defined as 31 days.
Line 23:
=== Spelling out numbers ===
Numbers from 1 to 100 can be spelled out in their equivalent English word by using the <code>spellout</code> parameter. If <code>spellout</code> is set to "yes", "y", "true" or "1", all numbers from 1 to 100 will be spelled out. If <code>spellout</code> is set to "auto", only numbers from 1 to 9 will be spelled out, as per the recommendations at [[Wikipedia:MOS:NUMERAL]].
It is also possible to set a custom maximum value for spelling out by using the <code>spelloutmax</code> parameter. For example, setting {{para|spellout|yes}} and {{para|spelloutmax|24}} will result in all numbers less than or equal to 24 being spelled out, and all numbers greater than 24 appearing as numerals.
=== Purge link ===
Add the parameter {{para|purge|yes}} to add a [[Wikipedia:WP:PURGE|purge]] link.
== Examples ==
| |||