Template:Age: Difference between revisions

From LCARS
(Created page with "<includeonly>{{#expr:floor(({{#time:U}}-{{#time:U|{{{1|1985}}}{{padleft:{{{2|11}}}|2|0|}}{{padleft:{{{3|25}}}|2|0}}}} + 86400*({{#time:Y}}-{{#time:Y|{{{1|1985}}}{{padleft:{{{2...")
 
m (Protected "Template:Age" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)))
 
(One intermediate revision by the same user not shown)
Line 3: Line 3:
  <nowiki>{{Birthdate_and_Age|YEAR|MM|DD}}</nowiki>
  <nowiki>{{Birthdate_and_Age|YEAR|MM|DD}}</nowiki>


Calculates the age of a person given their birthdate in ''real time''. Intended for use from within [[Template:Birthdate and Age]].
Calculates the age of a person given their birthdate in ''real time''. Intended for use from within [[Template:Player Birthdate and Age]].


=== Notes ===
=== Notes ===

Latest revision as of 13:00, 8 January 2017

Usage

{{Birthdate_and_Age|YEAR|MM|DD}}

Calculates the age of a person given their birthdate in real time. Intended for use from within Template:Player Birthdate and Age.

Notes

  • This template determines age by subtracting the given date in Unix seconds from the current time. It then performs an approximate correction to account for a leap day every 4 years, so it may be off by ±1 day.