Template:Birth date and age

Boobpedia - Encyclopedia of big boobs
Jump to: navigation, search
[edit] Template-info.gif Template documentation
Ambox content.gif This template is used on 2,000+ pages.
To avoid any disruptions and to save server load, any changes should first be tested in this template's /sandbox or /testcases subpage, or in your own user space. The tested changes can then be added in one single edit to this template. As a courtesy to other users, please discuss any changes at the talk page before implementing them.

Usage

The templates {{Birth date}} and {{Birth date and age}} return a person's date of birth and optionally his/her age. The latter also has the shortcut {{Bda}}.

Using this template rather than simply inserting the date into articles allows for the inclusion of hidden metadata about the date. This metadata can be used by web browsers and other software tools to extract the details, and display them using some other website or mapping tool, index or search them.

Syntax:

{{Birth date|year of birth|month of birth|day of birth}}

or

{{Birth date and age|year of birth|month of birth|day of birth}}
{{Bda|year of birth|month of birth|day of birth}}

Examples:

{{Birth date|1984|2|4}} returns "February 4, 1984(1984-02-04)"
{{Birth date|1984|2|04}} returns "February 4, 1984(1984-02-04)"
{{Birth date|1984|2|24}} returns "February 24, 1984(1984-02-24)"
{{Birth date and age|1984|2|4}} returns February 4, 1984 (1984-02-04) (age 32)
{{Birth date and age|1984|2|04}} returns February 4, 1984 (1984-02-04) (age 32)
{{Birth date and age|1984|2|24}} returns February 24, 1984 (1984-02-24) (age 32)

Day first (df) option

The default output of this template is to display the month before the day. The majority of readers will see the date displayed this way because they are not logged in and therefore do not have accounts with a date preference set. This default may not be appropriate in articles about people from parts of the world where the day precedes the month in a date. In such articles the optional parameter, "df", can be set (to "y" or "yes" for example) to display the day before the month.

Examples:

{{Birth date | 1984 | 2 | 24 | df=yes }} displays "24 February 1984" to readers without a date preference.
{{Birth date and age | 1984 | 2 | 24 | df=yes }} displays "24 February 1984 (age 32)" to readers without a date preference.

hCard microformat

The templates also return the date, hidden by CSS, in the ISO 8601 format needed by hCard microformats. for example:

<span class="bday">1984-02-24</span>

Notes

Note: {{Birth date}} and {{Birth date and age}} automatically add the category "xxxx births" to the page they are used on! If you do not want a category to be added, set the optional nocategory parameter (nocategory=1, for example).

Note: The template will appear broken when the parameters are left blank.

See also