23,985
edits
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
<includeonly>{{#expr:({{{4|{{formatnum:{{CURRENTYEAR}}|R}}+377}}}}})-({{{1}}})-(({{{5|{{CURRENTMONTH}}}}})<({{{2}}})or({{{5|{{CURRENTMONTH}}}}})=({{{2}}})and({{{6|{{CURRENTDAY}}}}})<({{{3}}}))}}</includeonly><noinclude> | <includeonly>{{#expr:({{{4|{{formatnum:{{CURRENTYEAR}}|R}}+377}}}}})-({{{1}}})-(({{{5|{{CURRENTMONTH}}}}})<({{{2}}})or({{{5|{{CURRENTMONTH}}}}})=({{{2}}})and({{{6|{{CURRENTDAY}}}}})<({{{3}}}))}}</includeonly><noinclude> | ||
This template returns the number of full years between two specified dates. If the second set of parameters is not included, it will return the number of full years between a specified date and today's real life date | This template returns the number of full years between two specified dates. If the second set of parameters is not included, it will return the number of full years between a specified date and the current stardate based on today's real life date (SB118 is set 377 years after the real life current date). | ||
;Syntax<nowiki>:</nowiki> | ;Syntax<nowiki>:</nowiki> | ||
:<nowiki>{{age|year1|month1|day1|year2|month2|day2}}</nowiki> | To calculate the number of years between two dates (e.g., age at time of death):<nowiki>{{age|year1|month1|day1|year2|month2|day2}}</nowiki> | ||
:<nowiki>{{age|year1|month1|day1}}</nowiki> | To calculate the number of years between current stardate and your specified date (e.g., current age):<nowiki>{{age|year1|month1|day1}}</nowiki> | ||
; Examples<nowiki>:</nowiki> | ; Examples<nowiki>:</nowiki> | ||
: <nowiki>{{age| | : <nowiki>{{age|2356|12|15|2386|7|14}}</nowiki> gives you: {{age|2356|12|15|2386|7|14}} | ||
: <nowiki>{{age| | : <nowiki>{{age|2356|12|15}}</nowiki> gives you: {{age|2356|12|15}} | ||
:For an SB118 character born on stardate 236503.14 (which translates to March 14, 2365), subtract 377 from the year to get 1988. Thus, that character's current age as of today in the SB118 universe is | :For an SB118 character born on stardate 236503.14 (which translates to March 14, 2365), subtract 377 from the year to get 1988. Thus, that character's current age as of today in the SB118 universe is | ||
: <nowiki>{{age| | : <nowiki>{{age|2365|3|14}}</nowiki> returns {{age|1988|3|14}}. | ||
: When using this template to calculate a person's age at death or a person's age on a specified date (rather than the person's current age), please substitute it into the page. | : When using this template to calculate a person's age at death or a person's age on a specified date (rather than the person's current age), please substitute it into the page. |