Template:Player Birthdate and Age: Difference between revisions

From LCARS
m (Protected "Template:Player Birthdate and Age" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)))
 
(4 intermediate revisions by the same user not shown)
Line 2: Line 2:
| y        = j F Y
| y        = j F Y
| sd      = Ym.d
| sd      = Ym.d
| u        = Y-m-d
| #default = F j, Y
| #default = F j, Y
}} |{{{1|1985}}}{{padleft:{{{2|11}}}|2|0|}}{{padleft:{{{3|25}}}|2|0}}}} (age: {{Age|{{#expr:{{{1|1985}}}}}|{{{2|11}}}|{{{3|25}}}}})</includeonly>
}} |{{{1|1985}}}{{padleft:{{{2|11}}}|2|0|}}{{padleft:{{{3|25}}}|2|0}}}} (age: {{Age|{{#expr:{{{1|1985}}}}}|{{{2|11}}}|{{{3|25}}}}})</includeonly>
<noinclude>
<noinclude>
=== Usage ===
=== Usage ===
For use with displaying a player's birthdate and age in ''in real time''. Default display is ''Month DD, YYYY''; use parameter ''df=y'' for the alternative display of ''DD Month YYYY'' or ''df=sd'' for stardate of ''YYYYMM.DD''.
For use with displaying a player's birthdate and age in ''in real time''. Default display is ''Month DD, YYYY''; use parameter ''df=y'' for the alternative display of ''DD Month YYYY'', df=u for the alternative display of ''YYYY-MM-DD'', or ''df=sd'' for stardate of ''YYYYMM.DD''.


===Examples===
===Examples===
Line 16: Line 17:
| {{Player Birthdate and Age|1980|03|04}}
| {{Player Birthdate and Age|1980|03|04}}
|-
|-
| <nowiki>{{Player Birthdate and Age|1980|09|10|df=y}}</nowiki>
| <nowiki>{{Player Birthdate and Age|1980|06|10|df=y}}</nowiki>
| {{Player Birthdate and Age|1980|09|10|df=y}}
| {{Player Birthdate and Age|1980|06|10|df=y}}
|-
| <nowiki>{{Player Birthdate and Age|1980|09|17|df=u}}</nowiki>
| {{Player Birthdate and Age|1980|09|17|df=u}}
|-
|-
| <nowiki>{{Player Birthdate and Age|1980|12|25|df=sd}}</nowiki>
| <nowiki>{{Player Birthdate and Age|1980|12|25|df=sd}}</nowiki>

Latest revision as of 14:03, 20 August 2016


Usage

For use with displaying a player's birthdate and age in in real time. Default display is Month DD, YYYY; use parameter df=y for the alternative display of DD Month YYYY, df=u for the alternative display of YYYY-MM-DD, or df=sd for stardate of YYYYMM.DD.

Examples

Code Result
{{Player Birthdate and Age|1980|03|04}} March 4, 1980 (age: 44)
{{Player Birthdate and Age|1980|06|10|df=y}} 10 June 1980 (age: 44)
{{Player Birthdate and Age|1980|09|17|df=u}} 1980-09-17 (age: 43)
{{Player Birthdate and Age|1980|12|25|df=sd}} 198012.25 (age: 43)