Template:Age in years and days/doc

This template returns the number of full years and surplus days between two specified dates. If only one date is entered, the template returns the number of full years and surplus days between the specified date and today's date.

This template does not generate a sort key. In a sortable table, use Template:Ayd which redirects to age in years and days nts.

Usage
Each date can be entered in a single parameter, or each date can be entered as three parameters: year, month, day.


 * → 22 years, 220 days
 * → 35 years, 13 days
 * → 14 years, 4 days
 * → 1 year, 1 day
 * → 1 year, 1 day

An error is shown if an entered date is not valid (1900 was not a leap year).
 * → Error: Second date should be year, month, day

Options
The default is to separate years and days with a comma. The separator is "and" if and is used.

The default calculates an age—the day of the second date is not included in the calculation. A duration including the second date is calculated if on is used.


 * → 23 years, 182 days
 * → 23 years, 182 days
 * → 23 years, 182 days