Template:Age in days/doc

From 2b2t Wiki
Jump to navigation Jump to search

Description

This template is used to calculate the duration between two dates in days. It can be useful for continuously counting the number of days that has passed for an event.

Syntax

The parameters for this template is a pair of two dates which includes a month, day, and year. While you can provide both dates, you can also fill in the first date and the template will automatically fill the second date with today's date.

These dates should be written in their numerical representation (such as 9-25-2027) or the template will return an error and will not work as expected.

Full Syntax

{{Age in days
|month1 =
|day1 =
|year1 =
|month2 =
|day2 =
|year2 =
}}

Sample Output

Writing {{Age in days|month1 = 8|day1 = 14|year1 = 2014}} will result in:

2620


Writing {{Age in days|month1 = 8|day1 = 14|year1 = 2014|month2 = 9|day2 = 27|year2 = 2014}} will result in:

44


Dependencies

This template uses the {{Gregorian serial date}} template and parser functions to calculate the result.