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...")
 
Line 47: Line 47:
 
|-
 
|-
 
|<code><nowiki>{{age in days||{{#time:j M Y|+ 15 months}}}}</nowiki></code>&nbsp;||gives {{age in days||{{#time:j M Y|+ 15 months}}}}
 
|<code><nowiki>{{age in days||{{#time:j M Y|+ 15 months}}}}</nowiki></code>&nbsp;||gives {{age in days||{{#time:j M Y|+ 15 months}}}}
|}
 
 
====Year, month and day====
 
To use, type:
 
:{|
 
|-
 
|<code><nowiki>{{age in days|year1|month1|day1|year2|month2|day2}}</nowiki></code>&nbsp;||(number of days between dates 1 and 2),
 
|-
 
|<code><nowiki>{{age in days|year1|month1|day1}}</nowiki></code>                        ||(number of days since date 1) or
 
|-
 
|<code><nowiki>{{age in days||||year2|month2|day2}}</nowiki></code>                      ||(number of day until date 2)
 
|}
 
 
Or with named parameters:
 
:{|
 
|-
 
|<code><nowiki>{{age in days|month1= |day1= |year1= |month2= |day2= | year2= }}</nowiki></code>&nbsp;||(number of days between dates 1 and 2),
 
|-
 
|<code><nowiki>{{age in days|month1= |day1= |year1= }}</nowiki></code>                              ||(number of days since date 1) or
 
|-
 
|<code><nowiki>{{age in days|month2= |day2= | year2= }}</nowiki></code>                              ||(number of day until date 2)
 
|}
 
 
Examples:
 
{|
 
|-
 
|<code><nowiki>{{age in days|2007|5|24|2008|4|23}}</nowiki></code>&nbsp;||gives {{age in days|2007|5|24|2008|4|23}}
 
|-
 
|<code><nowiki>{{age in days|2007|5|24}}</nowiki></code>                ||gives {{age in days|2007|5|24}}
 
 
|}
 
|}
  

Revision as of 08:22, 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||{{#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.