The Wiki for Tale 6 is in read-only mode and is available for archival and reference purposes only. Please visit the current Tale 11 Wiki in the meantime.
If you have any issues with this Wiki, please post in #wiki-editing on Discord or contact Brad in-game.
Difference between revisions of "Template:Age in days"
From ATITD6
Jump to navigationJump to search (Created page with "<includeonly>{{#ifexpr:{{{day1|}}}{{{3|}}}{{{month1|}}}{{{year1|}}}{{{day2|}}}{{{6|}}}{{{month2|}}}{{{5|}}}{{{year2|}}}{{{4|}}}{{#iferror:{{#expr:0*{{{1|}}}=0}}}}{{#iferror:{{#ex...") |
|||
(One intermediate revision by the same user not shown) | |||
Line 46: | Line 46: | ||
|<code><nowiki>{{age in days|27 May 2002}}</nowiki></code> ||gives {{age in days|27 May 2002}} | |<code><nowiki>{{age in days|27 May 2002}}</nowiki></code> ||gives {{age in days|27 May 2002}} | ||
|- | |- | ||
− | |<code><nowiki>{{age in days| | + | |<code><nowiki>{{age in days|2002-05-27}}</nowiki></code> ||gives {{age in days|27 May 2002}} |
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
− | |<code><nowiki>{{age in days| | + | |<code><nowiki>{{age in days|05/27/2002}}</nowiki></code> ||gives {{age in days|27 May 2002}} |
|- | |- | ||
− | |<code><nowiki>{{age in days| | + | |<code><nowiki>{{age in days||{{#time:j M Y|+ 15 months}}}}</nowiki></code> ||gives {{age in days||{{#time:j M Y|+ 15 months}}}} |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|} | |} | ||
− | |||
===Rounding=== | ===Rounding=== |
Latest revision as of 08:26, 24 August 2015
Usage
Inputting dates
This template returns the number of days between two dates. Dates may be input either as full dates or as year, month and day. Omitted parameters to their current value.
Full dates
To use, type:
{{age in days|date1|date2}}
(number of days between dates 1 and 2), {{age in days|date1}}
(number of days since date 1) or {{age in days||date2}}
(number of day until date 2)
Examples:
{{age in days|19 Aug 2008|4 Sep 2010}}
gives 746 {{age in days|27 May 2002}}
gives 8,215 {{age in days|2002-05-27}}
gives 8,215 {{age in days|05/27/2002}}
gives 8,215 {{age in days||{{#time:j M Y|+ 15 months}}}}
gives 456
Rounding
The template rounds down to the nearest number of full days.
Time zones
Date parameters left undefined default to their current value. Note that this is the current UTC value.