Template:Birth date and age/doc: Difference between revisions

no edit summary
(→‎Using month name instead of number: removing, as it doesn't seem work)
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
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.
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.


This template is intended for use in an article about a living person. For an article about a dead person, use {{tl|Birth date}} with {{tl|Death date and age}}.
This template is intended for use in an article about a living person. For an article about a dead person, use {{tl|Birth date}} with {{tl|Death date and age}}.
Line 41: Line 41:
: <code><nowiki>{{Birth date and age|year=1993|month=2|day=24|df=yes}}</nowiki></code> returns "{{Birth date and age|year=1993|month=2|day=24|df=yes}}"
: <code><nowiki>{{Birth date and age|year=1993|month=2|day=24|df=yes}}</nowiki></code> returns "{{Birth date and age|year=1993|month=2|day=24|df=yes}}"
: <code><nowiki>{{Birth date and age|year=1993|month=2|day=24|mf=yes}}</nowiki></code> returns "{{Birth date and age|year=1993|month=2|day=24|mf=yes}}"
: <code><nowiki>{{Birth date and age|year=1993|month=2|day=24|mf=yes}}</nowiki></code> returns "{{Birth date and age|year=1993|month=2|day=24|mf=yes}}"
=== Using full date in one parameter ===
The following examples use a parameter value that will not work in the {{tl|Birth date}}, {{tl|Death date}}, or {{tl|Death date and age}} templates.
The date format entered does not change the date format displayed, which is MDY by default or DMY if <code><nowiki>|df=y</nowiki></code> (to display the date in the same format it was entered, use {{tlp|Birth-date and age}}).
; Unnamed parameter for full date (output in MDY format)
: <code><nowiki>{{Birth date and age|1993-2-24}}</nowiki></code> returns "{{Birth date and age|1993-2-24}}"
: <code><nowiki>{{Birth date and age|Feb 24, 1993}}</nowiki></code> returns "{{Birth date and age|Feb 24, 1993}}"
: <code><nowiki>{{Birth date and age|24 Feb 1993}}</nowiki></code> returns "{{Birth date and age|24 Feb 1993}}"
; Unnamed parameter for full date (output in DMY format)
: <code><nowiki>{{Birth date and age|1993-2-24|df=y}}</nowiki></code> returns "{{Birth date and age|1993-2-24|df=y}}"
: <code><nowiki>{{Birth date and age|24 Feb 1993|df=y}}</nowiki></code> returns "{{Birth date and age|24 Feb 1993|df=y}}"
: <code><nowiki>{{Birth date and age|Feb 24, 1993|df=y}}</nowiki></code> returns "{{Birth date and age|Feb 24, 1993|df=y}}"