[edit]
DocumentationThis template returns the number of full years between two specified dates. If the second set of parameters is not included, it will return the number of full years between a specified date and today's date.
- Syntax:
{{Age|year|month|day|year2|month2|day2}}
or{{Age|year|month|day}}
- Examples:
{{Age|1989|4|21|2011|2|26}}
returns "21"{{Age|1989|4|21}}
returns "35"{{Age|1889|9|23}}
returns "135"
- When using this template to calculate a person's age at death or a person's age on a specified date (rather than the person's current age), please substitute it into the page (see Help:Substitution).
- Example:
{{subst:Age|1989|4|21|2011|2|26}}
- Example:
- When entering dates before the Common Era, use astronomical year numbering: 1 BCE is represented by 0, 2 BCE by -1, 3 BCE by -2 etc. For example, the following expression returns the number of full years elapsed since the accession date the first Emperor in Japan, which took place on February 11, 660 BCE:
{{Age|-659|2|11}}
returns "2684"
- (BCE is exactly the same as BC, so February 11, 660 BCE is also February 11, 660 BC)
- Note:
- This template does not check for incorrect input:
{{Age|2000|4|22|2015|8|32}}
returns "15" (surplus days do not count as extra months){{Age|2000|4|22|2015|13|7}}
returns "15" (surplus months do not count as extra years){{Age|1900|2|29}}
returns "125" (1900 is not a leap year)
This documentation is copied from The Loud House Encyclopedia.