Difference between revisions of "Template:Start date and age"

From Hydrogenaudio Knowledgebase
Jump to: navigation, search
(Initial version of template, with basic year calculation.)
 
m (Parentheses added around age.)
Line 1: Line 1:
{{#dateformat:{{{1|{{CURRENTYEAR}}}}}{{#if:{{{2|}}}|-{{{2|}}}|}}{{#if:{{{3|}}}|-{{{3|}}}|}}|mdy}}; {{#expr: {{CURRENTYEAR}}-{{{1|{{CURRENTYEAR}}}}} }} years ago<noinclude>
+
{{#dateformat:{{{1|{{CURRENTYEAR}}}}}{{#if:{{{2|}}}|-{{{2|01}}}|}}{{#if:{{{3|}}}|-{{{3|}}}|}}|mdy}} ({{#expr: {{CURRENTYEAR}}-{{{1|{{CURRENTYEAR}}}}} }} years ago)<noinclude>
 
==Documentation==
 
==Documentation==
 
<pre>{{start date and age|YYYY|MM|DD}}</pre>
 
<pre>{{start date and age|YYYY|MM|DD}}</pre>
 
</noinclude>
 
</noinclude>

Revision as of 12:21, 13 October 2018

2022 (0 years ago)

Documentation

{{start date and age|YYYY|MM|DD}}