Template:DoB: Difference between revisions

From SmashWiki, the Super Smash Bros. wiki
Jump to navigationJump to search
m (Testing something)
mNo edit summary
 
(11 intermediate revisions by 8 users not shown)
Line 1: Line 1:
<includeonly>{{#if:{{{df|}}}|{{#expr:{{{3|{{{day}}}}}}}}{{MONTHNAME|{{{2|{{{month}}}}}}}}|{{MONTHNAME|{{{2|{{{month}}}}}}}}{{#expr:{{{3|{{{day}}}}}}}},}}{{{1|{{{year}}}}}}<span style="display:none">(<span class="bday">{{{1|{{{year}}}}}}-{{padleft:{{{2|{{{month}}}}}}|2|0}}-{{padleft:{{{3|{{{day}}}}}}|2|0}}</span>)</span><span class="noprint">(age&nbsp;{{age|{{{1|{{{year}}}}}}|{{{2|{{{month}}}}}}|{{{3|{{{day}}}}}}}})</span></includeonly><noinclude>
<includeonly><time itemprop="birthDate" datetime="{{{1|{{{year}}}}}}-{{padleft:{{{2|{{{month}}}}}}|2|0}}-{{padleft:{{{3|{{{day}}}}}}|2|0}}">{{#if:{{{df|}}}|{{#expr:{{{3|{{{day}}}}}}}} {{MONTHNAME|{{{2|{{{month}}}}}}}}|{{MONTHNAME|{{{2|{{{month}}}}}}}} {{#expr:{{{3|{{{day}}}}}}}},}} {{{1|{{{year}}}}}}</time> <span class="noprint" style="white-space:nowrap">({{#if:{{{4|}}}|aged {{{4}}}|age {{age|{{{1|{{{year}}}}}}|{{{2|{{{month}}}}}}|{{{3|{{{day}}}}}}}}}})</span></includeonly><noinclude>
<nowiki>{{DoB|YEAR|MONTH|DAY}}</nowiki>
<nowiki>{{DoB|YEAR|MONTH|DAY}}</nowiki>


This is the Birth date and age template from Wikipedia, and is available under the GFDL. I changed the name to DoB because it's a lot easier to type, and the only reason why Wikipedia don't call it something like that is because they've got several very similar templates, so they give them more specific names to avoid confusion.
Calculates a person's current age when given their birth date. Main use is for {{t|Infobox Smasher}} and user pages.


This proposed new Date of Birth template is primarily for use with the [[Template:Smasherbeta|Smasher template]]. Because most people have better things to do than remember Smashers' birthdays, the current age on a lot of Smasher articles is out of date. This template calculates how old someone is given their date of birth.
If the person has passed away, an optional 4th parameter can be set to their age at time of death.
</noinclude>
 
Originally taken from Wikipedia.
 
[[Category:Meta-templates]]</noinclude>

Latest revision as of 22:27, February 13, 2024

{{DoB|YEAR|MONTH|DAY}}

Calculates a person's current age when given their birth date. Main use is for {{Infobox Smasher}} and user pages.

If the person has passed away, an optional 4th parameter can be set to their age at time of death.

Originally taken from Wikipedia.