Template:Birth date

From Furry Basketball Association
Jump to navigation Jump to search
Template documentation[view] [edit] [history] [purge]

To use this template on a player's form, basically do the following:

Examples

Unnamed parameters for year, month, day
{{Birth date and age|1993|2|24}} returns " (1993-02-24) February 24, 1993 (age 33)"
{{Birth date and age|1993|2|24|df=yes}} returns " (1993-02-24) 24 February 1993 (age 33)"
{{Birth date and age|1993|2|24|mf=yes}} returns " (1993-02-24) February 24, 1993 (age 33)"
Named parameters for year, month, day
{{Birth date and age|year=1993|month=2|day=24}} returns " (1993-02-24) February 24, 1993 (age 33)"
{{Birth date and age|year=1993|month=2|day=24|df=yes}} returns " (1993-02-24) 24 February 1993 (age 33)"
{{Birth date and age|year=1993|month=2|day=24|mf=yes}} returns " (1993-02-24) February 24, 1993 (age 33)"

Using month name instead of number

The following examples use a parameter value that will not work in the {{Birth date}}, {{Death date}}, or {{Death date and age}} templates.

Unnamed parameters for year, month name, day
{{Birth date and age|1993|Feb|24}} returns " (1993-Feb-24) February 24, 1993 (age Expression error: Unrecognized word "feb".)"
{{Birth date and age|1993|Feb|24|df=yes}} returns " (1993-Feb-24) 24 February 1993 (age Expression error: Unrecognized word "feb".)"
{{Birth date and age|1993|Feb|24|mf=yes}} returns " (1993-Feb-24) February 24, 1993 (age Expression error: Unrecognized word "feb".)"
Named parameters for year, month name, day
{{Birth date and age|year=1993|month=Feb|day=24}} returns " (1993-Feb-24) February 24, 1993 (age Expression error: Unrecognized word "feb".)"
{{Birth date and age|year=1993|month=Feb|day=24|df=yes}} returns " (1993-Feb-24) 24 February 1993 (age Expression error: Unrecognized word "feb".)"
{{Birth date and age|year=1993|month=Feb|day=24|mf=yes}} returns " (1993-Feb-24) February 24, 1993 (age Expression error: Unrecognized word "feb".)"

Using full date in one parameter

The following examples use a parameter value that will not work in the {{Birth date}}, {{Death date}}, or {{Death date and age}} templates.

The date format entered does not change the date format displayed, which is MDY by default or DMY if |df=y (to display the date in the same format it was entered, use {{Birth-date and age}}).

Unnamed parameter for full date (output in MDY format)
{{Birth date and age|1993-2-24}} returns " (1993-2-24-{{{month}}}-{{{day}}}) Expression error: Unrecognized punctuation character "{"., 1993-2-24 (age Expression error: Unrecognized punctuation character "{".)"
{{Birth date and age|Feb 24, 1993}} returns " (Feb 24, 1993-{{{month}}}-{{{day}}}) Expression error: Unrecognized punctuation character "{"., Feb 24, 1993 (age Expression error: Unrecognized word "feb".)"
{{Birth date and age|24 Feb 1993}} returns " (24 Feb 1993-{{{month}}}-{{{day}}}) Expression error: Unrecognized punctuation character "{"., 24 Feb 1993 (age Expression error: Unrecognized word "feb".)"
Unnamed parameter for full date (output in DMY format)
{{Birth date and age|1993-2-24|df=y}} returns " (1993-2-24-{{{month}}}-{{{day}}}) Expression error: Unrecognized punctuation character "{". 1993-2-24 (age Expression error: Unrecognized punctuation character "{".)"
{{Birth date and age|24 Feb 1993|df=y}} returns " (24 Feb 1993-{{{month}}}-{{{day}}}) Expression error: Unrecognized punctuation character "{". 24 Feb 1993 (age Expression error: Unrecognized word "feb".)"
{{Birth date and age|Feb 24, 1993|df=y}} returns " (Feb 24, 1993-{{{month}}}-{{{day}}}) Expression error: Unrecognized punctuation character "{". Feb 24, 1993 (age Expression error: Unrecognized word "feb".)"
Output as compared to {{Birth-date and age}}
{{Birth date and age|24 February 1993}} returns " (24 February 1993-{{{month}}}-{{{day}}}) Expression error: Unrecognized punctuation character "{"., 24 February 1993 (age Expression error: Unrecognized word "february".)"
{{Birth-date and age|24 February 1993}} returns "Template:Birth-date and age"
{{Birth date and age|Feb. 24, 1993}} returns " (Feb. 24, 1993-{{{month}}}-{{{day}}}) Expression error: Unrecognized punctuation character "{"., Feb. 24, 1993 (age Expression error: Unrecognized word "feb".)"
{{Birth-date and age|Feb. 24, 1993}} returns "Template:Birth-date and age"

TemplateData

This is the TemplateData documentation for this template used by VisualEditor and other tools.

Birth date

<templatedata> { "description": "This template will return a living person's date of birth and age. 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.", "params": { "1": { "label": "Year of birth", "description": "The year in which the person was born", "type": "number", "example": "1993", "required": true, "aliases": [ "year" ] }, "2": { "label": "Month of birth", "description": "The month (number) in which the person was born", "type": "number", "example": "2", "required": true, "aliases": [ "month" ] }, "3": { "label": "Day of birth", "description": "The day (number) in which the person was born", "type": "number", "example": "24", "required": true, "aliases": [ "day" ] }, "df": { "label": "Day first", "description": "When set to 'y' or 'yes', the date of birth is output in a DMY format", "type": "string", "example": "y", "required": false }, "mf": { "label": "Month first", "description": "When set to 'y' or 'yes', stresses that the default MDY date format is intended for the date of birth", "type": "string", "example": "y", "required": false } } } </templatedata>