Jump to content

Template:Birth date and age: Difference between revisions

The comprehensive free global encyclopedia of CEOs, corporate leadership, and business excellence
Admin (talk | contribs)
Create birth date template
 
Create or repair template to remove red links and rendering errors across articles
 
Line 1: Line 1:
{{{1}}}/{{{2}}}/{{{3}}} (age {{#expr: {{CURRENTYEAR}} - {{{1}}} - {{#ifexpr: ({{CURRENTMONTH}} < {{{2}}}) or (({{CURRENTMONTH}} = {{{2}}}) and ({{CURRENTDAY}} < {{{3}}})) | 1 | 0 }} }})<noinclude>
<includeonly><span class="bday" style="display:none;">{{{1}}}-{{padleft:{{#expr:{{{2}}}}}|2|0}}-{{padleft:{{#expr:{{{3}}}}}|2|0}}</span>{{#if:{{{df|}}}|{{#expr:{{{3}}}}} {{MONTHNAME|{{{2}}}}} {{{1}}}|{{MONTHNAME|{{{2}}}}} {{#expr:{{{3}}}}}, {{{1}}}}} (age&nbsp;{{#expr: {{CURRENTYEAR}} - {{{1}}} - {{#ifexpr: ({{CURRENTMONTH}} < {{{2}}}) or (({{CURRENTMONTH}} = {{{2}}}) and ({{CURRENTDAY}} < {{{3}}})) | 1 | 0 }} }})</includeonly><noinclude>
== Usage ==
Displays a date of birth in Manual of Style format followed by the subject's current age.
<pre>
 
{{Birth date and age|YYYY|MM|DD}}
<pre>{{Birth date and age|1947|6|13}}   -> June 13, 1947 (age 78)
</pre>
{{Birth date and age|1947|6|13|df=y}} -> 13 June 1947 (age 78)</pre>
Example: {{Birth date and age|1961|12|24}} produces December 24, 1961 (age)
 
Parameters are year, month number and day. Replaces an earlier revision that output <code>1947/6/13</code>, which did not follow the [[CEO.wiki:Manual of Style|Manual of Style]].
 
[[Category:Date templates]]
[[Category:Date templates]]
</noinclude>
</noinclude>

Latest revision as of 05:25, 25 August 2026

Displays a date of birth in Manual of Style format followed by the subject's current age.

{{Birth date and age|1947|6|13}}    -> June 13, 1947 (age 78)
{{Birth date and age|1947|6|13|df=y}} -> 13 June 1947 (age 78)

Parameters are year, month number and day. Replaces an earlier revision that output 1947/6/13, which did not follow the Manual of Style.