Toggle search
Search
Toggle menu
Notifications
Toggle personal menu
Editing
Template:Time ago/doc
Template page
Views
Read
Edit
View history
associated-pages
Template
Discussion
More actions
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Documentation}} 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. The result is rounded down. "Month" is defined as 31 days. ;Usage * <code><nowiki>{{</nowiki>'''Time ago'''|''timestamp''<nowiki>}}</nowiki></code> The timestamp can be almost any solid, readable format but to avoid ambiguity mistakes, one of the styles below is preferred. * <code>magnitude</code> parameter can be set to explicitly use certain unit. Allowed values are: <code>seconds</code>, <code>minutes</code>, <code>hours</code>, <code>days</code>, <code>weeks</code>, <code>months</code> and <code>years</code>. * <code>min_magnitude</code> parameter can be set to use the specified unit or bigger units. Allowed values are: <code>seconds</code>, <code>minutes</code>, <code>hours</code>, <code>days</code>, <code>months</code> and <code>years</code>. * <code>ago</code> parameter can be set to override the default usage of the text "<code>ago</code>". ;Examples * <tt><nowiki>{{Time ago| -83 minutes}}</nowiki></tt> → '''{{Time ago|-83 minutes}}''' * <tt><nowiki>{{Time ago| -334 minutes}}</nowiki></tt> → '''{{Time ago|-334 minutes}}''' * <tt><nowiki>{{Time ago|{{REVISIONTIMESTAMP}}}}</nowiki></tt> → '''{{Time ago|{{REVISIONTIMESTAMP}}}}''' * <tt><nowiki>{{Time ago| Jan 21, 2001 3:45 PM}}</nowiki></tt> → '''{{Time ago|Jan 21 2001 3:45 PM}}''' * <tt><nowiki>{{Time ago| Nov 6 2008}}</nowiki></tt> → '''{{Time ago|Nov 6 2008}}''' * <tt><nowiki>{{Time ago| Nov 6 2008|magnitude=weeks}}</nowiki></tt> → '''{{Time ago| Nov 6 2008|magnitude=weeks}}''' * <tt><nowiki>{{Time ago| Nov 6 2008|min_magnitude=days}}</nowiki></tt> → '''{{Time ago|Nov 6 2008|min_magnitude=days}}''' * <tt><nowiki>{{Time ago| Nov 6 2008|min_magnitude=years}}</nowiki></tt> → '''{{Time ago|Nov 6 2008|min_magnitude=years}}''' * <tt><nowiki>{{Time ago| Nov 6 2008|ago=in the past}}</nowiki></tt> → '''{{Time ago|Nov 6 2008|ago=in the past}}''' * <tt><nowiki>{{Time ago| Nov 6 2008|purge=yes}}</nowiki></tt> → '''{{Time ago|Nov 6 2008|purge=yes}}''' * <tt><nowiki>{{Time ago| Nov 6 2008|purge=x}}</nowiki></tt> → '''{{Time ago|Nov 6 2008|purge=x}}''' <includeonly>[[Category:Mathematical function templates]]</includeonly><noinclude></noinclude>
Summary:
Please note that all contributions to WoopMC may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
WoopMC:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)