Template:Age2/doc

This template returns the number(s) of full years between two specified dates. It may return one number (e.g. "50") or two possible numbers (e.g. "50-51") of full years, depending on the given information of the two dates.

The template is especially designed for situations where the day, or day and month, of the two dates is unknown. If the year, month and day are all known, you may use Age or Age nts as well.

Usage

 * ,,   are for the starting date
 * ,,   are for the ending date
 * and  are required
 * ,,  ,   are optional, if one or some of them is unknown, it may be omitted, or left blank, or filled in "0", "00", like:   or  ;   or
 * When entering dates before the Common Era, use astronomical year numbering: 1 BC is represented by 0, 2 BC by -1, 3 BC by -2, etc. For example, to calculate Augustus (23 September 63 BC – 19 August 14 AD)'s age:  returns ""
 * "sortable", optional, fill in "yes" to add a hidden key, making it sort correctly in sortable tables:  returns "", whose HTML code is " ", where it is considered 9.5, making it greater than 9 but less than 10.

Examples

 * returns ""
 * returns "" (if day2 >= 23 it'll be 10, otherwise it'll be 9)
 * returns "" (it can only be 10)
 * returns "" (it can only be 9)
 * returns "" (10 and 9 are both possible)

When one of the dates is the first or last day of the month or year:
 * returns "" (it can only be 10, even if month2 and day2 are both 1)
 * returns "" (it can only be 10, even if day1 = 31)
 * returns "" (if day2 = 31 it'll be 10, otherwise it'll be 9)
 * returns "" (it can only be 9)
 * returns "" (if day1 = 29 (2000 is a leap year) it'll be 9, otherwise it'll be 10)

Note
This template does not check for incorrect input:
 * returns "0" (surplus days do not count as extra months)
 * returns "0" (surplus months do not count as extra years)