Template:Age as of date/doc: Difference between revisions

From Hololive Fan Wiki
Content added Content deleted
(→‎Examples: Example)
 
Line 28: Line 28:
| style="text-align:left;" | <kbd><nowiki>{{Age as of date|50|</nowiki>{{#expr: {{CURRENTYEAR}} - 2}}|{{CURRENTMONTHNAME}}|{{CURRENTDAY}}}}</kbd>
| style="text-align:left;" | <kbd><nowiki>{{Age as of date|50|</nowiki>{{#expr: {{CURRENTYEAR}} - 2}}|{{CURRENTMONTHNAME}}|{{CURRENTDAY}}}}</kbd>
| style="text-align:center;" | {{Age as of date|50|{{#expr: {{CURRENTYEAR}} - 2}}|{{CURRENTMONTHNAME}}|{{CURRENTDAY}}}}
| style="text-align:center;" | {{Age as of date|50|{{#expr: {{CURRENTYEAR}} - 2}}|{{CURRENTMONTHNAME}}|{{CURRENTDAY}}}}
|-
| style="text-align:left;" | <kbd><nowiki>{{Age as of date|50|</nowiki>{{#expr: {{CURRENTYEAR}} - 2}}|1}}</kbd>
| style="text-align:center;" | {{Age as of date|50|{{#expr: {{CURRENTYEAR}} - 2}}|1}}
|-
| style="text-align:left;" | <kbd><nowiki>{{Age as of date|50|</nowiki>{{#expr: {{CURRENTYEAR}} - 2}}|12}}</kbd>
| style="text-align:center;" | {{Age as of date|50|{{#expr: {{CURRENTYEAR}} - 2}}|12}}
|-
| style="text-align:left;" | <kbd><nowiki>{{Age as of date|50|</nowiki>{{#expr: {{CURRENTYEAR}} - 2}}|{{CURRENTMONTH}}}}</kbd>
| style="text-align:center;" | {{Age as of date|50|{{#expr: {{CURRENTYEAR}} - 2}}|{{CURRENTMONTH}}}}
|-
| style="text-align:left;" | <kbd><nowiki>{{Age as of date|50|</nowiki>{{#expr: {{CURRENTYEAR}} - 2}}|{{CURRENTMONTHABBREV}}}}</kbd>
| style="text-align:center;" | {{Age as of date|50|{{#expr: {{CURRENTYEAR}} - 2}}|{{CURRENTMONTHABBREV}}}}
|-
| style="text-align:left;" | <kbd><nowiki>{{Age as of date|50|</nowiki>{{#expr: {{CURRENTYEAR}} - 2}}|{{CURRENTMONTHNAME}}}}</kbd>
| style="text-align:center;" | {{Age as of date|50|{{#expr: {{CURRENTYEAR}} - 2}}|{{CURRENTMONTHNAME}}}}
|-
| style="text-align:left;" | <kbd><nowiki>{{Age as of date|50|</nowiki>{{#expr: {{CURRENTYEAR}} - 2}}}}</kbd>
| style="text-align:center;" | {{Age as of date|50|{{#expr: {{CURRENTYEAR}} - 2}}}}
|}
|}



Latest revision as of 19:21, 29 June 2024

Template:Mbox

Usage[edit]

SYNTAX {{Age as of date|Known Age|Year at time of Known Age|Birth Month|Birth Day}}

This template calculates a person's current age based on a known age as at a specific year and their birthday. This is useful when a reference states a talents or staff's age at the time of a particular milestone. For example, Someone with a birthday of March 3rd, who was age 14 during the year 2010 will be written as so

{{Age as of date|14|2010|March|3}} 

The age, year, and day must be supplied as W:natural numbers; month can be specified as a natural number as well as by name or abbreviation (e.g., "August" or "Aug"). The W:Gregorian calendar is assumed, with no special support provided for W:dual dating or the difference between W:Old Style and New Style dates.

Examples[edit]

Template text Result
{{Age as of date|50|2022|1|1}} 53
{{Age as of date|50|2022|12|31}} 52
{{Age as of date|50|2022|07|2}} 52
{{Age as of date|50|2022|Jul|2}} 52
{{Age as of date|50|2022|July|2}} 52

See also[edit]