Template:Age

From Cvillepedia
Revision as of 11:50, 30 June 2009 by B.S. Lawrence (talk | contribs) (Add to the 'births' category based on year parameter; show the documentation in line rather than in link.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Template:Age calculates and displays a person's current age, based on their birth date and the current date. Additionally, it will add the page to the category "YEAR births", where YEAR is the person's birth year.

The template takes three unnamed parameters: in order, the year, month, and day of the month in which the person was born.

Usage example:

Age {{age|1966|09|11}} would display "Age 59" on the date 30 Jun 2009.

It is often used in the officeholder templates with the birth_date parameter as follows.

| birth_date = Sept. 11, 1966<br/>Age {{age|1966|09|11}}