Template:Duration

From RuneRealm Wiki

This is the current revision of this page, as edited by Alex (talk | contribs) at 00:24, 17 October 2024 (Created page with "<includeonly>{{formatnum:{{#expr:floor(({{#time:U}}-{{#time:U|{{{time|{{{Month}}}/{{{Day}}}/{{{Year|{{#time:Y}}}}} }}} }})/(60*60*24)) round 0}}}}{{{1| days}}}</includeonly><noinclude>{{/doc}}</noinclude>"). The present address (URL) is a permanent link to this version.

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Template documentation
This documentation is transcluded from Template:Duration/doc. [edit] [history] [purge]

Usage

Place {{Duration|Month=1 until 12|Day=1 until 31}} on the page.

Note that 01 in the Month parameter is not allowed, but 01 in the Day parameter is allowed.

If you want to add a year, simply add {{Duration|Month=3|Day=14|Year=2012}}

If you want to hide the "days" behind this, you can place an extra | before the rest of the parameters: {{Duration||Month=3|Day=14}}. It has to be the first parameter, otherwise it won't work.

Examples

An example for 3/14 of this year (Month=3, Day=14) is:

3/14/2024 is currently 259 days days ago.


An example for 3/14 of 2009 (Month=3, Day=14, Year=2012) is:

3/14/2009 is currently 4,642 days days ago.

Other short way

You could also place {{Duration|time=14-3-2009}} on the page to show 5,738 days. You should mind, however, that it must be in the order of (d)d-(m)m(-yyyy) to let it work. If no year is filled in, the current year is taken. For example, you could fill in 02-01-2000 or 2-1-2000, and you could also just add 2-1 to see the amount of days since 2 January this year. Also, just 2 1 2000 won't work.