Jump to content

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

→‎Examples: show additional examples which work in this template after it was converted to use Module:Age
(update examples and template data)
(→‎Examples: show additional examples which work in this template after it was converted to use Module:Age)
Line 53: Line 53:
: <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 month name instead of number ===
The following examples use a parameter value that will not work in the {{tlp|Birth date}}, {{tlp|Death date}}, or {{tlp|Death date and age}} templates.
; Unnamed parameters for year, month name, day
: <code><nowiki>{{Birth date and age|1993|Feb|24}}</nowiki></code> returns "{{Birth date and age|1993|Feb|24}}"
: <code><nowiki>{{Birth date and age|1993|Feb|24|df=yes}}</nowiki></code> returns "{{Birth date and age|1993|Feb|24|df=yes}}"
: <code><nowiki>{{Birth date and age|1993|Feb|24|mf=yes}}</nowiki></code> returns "{{Birth date and age|1993|Feb|24|mf=yes}}"
; Named parameters for year, month name, day
: <code><nowiki>{{Birth date and age|year=1993|month=Feb|day=24}}</nowiki></code> returns "{{Birth date and age|year=1993|month=Feb|day=24}}"
: <code><nowiki>{{Birth date and age|year=1993|month=Feb|day=24|df=yes}}</nowiki></code> returns "{{Birth date and age|year=1993|month=Feb|day=24|df=yes}}"
: <code><nowiki>{{Birth date and age|year=1993|month=Feb|day=24|mf=yes}}</nowiki></code> returns "{{Birth date and age|year=1993|month=Feb|day=24|mf=yes}}"
=== Using full date in one parameter ===
The following examples use a parameter value that will not work in the {{tlp|Birth date}}, {{tlp|Death date}}, or {{tlp|Death date and age}} templates.
The date format entered does not change the date format displayed, which is MDY by default or DMY if {{para|df|y}} (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}}"
; Output as compared to {{tlp|Birth-date and age}}
: <code><nowiki>{{Birth date and age|24 February 1993}}</nowiki></code> returns "{{Birth date and age|24 February 1993}}"
: <code><nowiki>{{Birth-date and age|24 February 1993}}</nowiki></code> returns "{{Birth-date and age|24 February 1993}}"
: <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|Feb. 24, 1993}}</nowiki></code> returns "{{Birth-date and age|Feb. 24, 1993}}"


== TemplateData ==
== TemplateData ==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.