Changes
Template:Start date and age (view source)
Revision as of 18:54, 17 October 2017
, 18:54, 17 October 2017use Template:Trim on month to avoid #time error if caller has leading or trailing whitespace
<includeonly><!--
IMPLEMENTATION OF DATE
-->{{#if: {{{1|}}}<!--
-->|{{#if: {{{2|}}}<!--
-->|{{#if: {{{3|}}}<!--
-->|{{#ifeq:{{yesno|{{{df|no}}}}}|yes<!--
-->|{{#expr:{{{3}}}}} {{MONTHNAME|{{{2}}}}}<!--
-->|{{MONTHNAME|{{{2}}}}} {{#expr:{{{3}}}}},<!--
-->}} {{{1}}}<!--
-->|{{MONTHNAME|{{{2}}}}} {{{1}}}<!--
-->}}<!--
-->|{{{1}}}<!--
-->}}<!--
--><span class="noprint">{{#ifeq:{{yesno|{{{paren|{{{p|no}}}}}}}}|yes||;}}<!--
-->{{#ifeq:{{yesno|{{{br|no}}}}}|yes|<br/>| }}<!--
-->{{#ifeq:{{yesno|{{{paren|{{{p|no}}}}}}}}|yes|(}}<!--
-->{{#if: {{{2|}}}<!--
-->|{{#if: {{{3|}}}<!--
-->|{{time ago|{{{1}}}-{{{2}}}-{{{3}}}|min_magnitude=days}}<!--
-->|{{years or months ago|{{{1}}}|{{#time:n|1-{{trim|{{{2}}}}}-1}}}}<!--
-->}}<!--
-->|{{#iferror:{{#expr:{{{1}}}}}<!--
-->|{{time ago|{{{1}}}|min_magnitude=days}}<!--
-->|{{years or months ago|{{{1}}}}}<!--
-->}}<!--
-->}}<!--
-->{{#ifeq:{{yesno|{{{paren|{{{p|no}}}}}}}}|yes|)}}</span><!--
-->|{{Error|Error: first parameter is missing.|tag=span}}<!--
-->}}<!--
IMPLEMENTATION OF microformat date classes
--><span style="display:none"> (<span class="{{#ifeq:{{yesno|{{{end|no}}}}}|yes|dtend|bday dtstart published updated}}"><!--
-->{{#if: {{{1|}}}<!--
-->|{{{1}}}<!--
-->{{#if: {{{2|}}}<!--
-->| -{{#time:m|1-{{trim|{{{2}}}}}-1}}<!--
-->{{#if: {{{3|}}}<!--
-->| -{{padleft:{{{3}}}|2|0}}<!--
-->}}<!--
-->}}<!--
-->}}<!--
--></span>)</span></includeonly><noinclude>
{{documentation}}
</noinclude>
IMPLEMENTATION OF DATE
-->{{#if: {{{1|}}}<!--
-->|{{#if: {{{2|}}}<!--
-->|{{#if: {{{3|}}}<!--
-->|{{#ifeq:{{yesno|{{{df|no}}}}}|yes<!--
-->|{{#expr:{{{3}}}}} {{MONTHNAME|{{{2}}}}}<!--
-->|{{MONTHNAME|{{{2}}}}} {{#expr:{{{3}}}}},<!--
-->}} {{{1}}}<!--
-->|{{MONTHNAME|{{{2}}}}} {{{1}}}<!--
-->}}<!--
-->|{{{1}}}<!--
-->}}<!--
--><span class="noprint">{{#ifeq:{{yesno|{{{paren|{{{p|no}}}}}}}}|yes||;}}<!--
-->{{#ifeq:{{yesno|{{{br|no}}}}}|yes|<br/>| }}<!--
-->{{#ifeq:{{yesno|{{{paren|{{{p|no}}}}}}}}|yes|(}}<!--
-->{{#if: {{{2|}}}<!--
-->|{{#if: {{{3|}}}<!--
-->|{{time ago|{{{1}}}-{{{2}}}-{{{3}}}|min_magnitude=days}}<!--
-->|{{years or months ago|{{{1}}}|{{#time:n|1-{{trim|{{{2}}}}}-1}}}}<!--
-->}}<!--
-->|{{#iferror:{{#expr:{{{1}}}}}<!--
-->|{{time ago|{{{1}}}|min_magnitude=days}}<!--
-->|{{years or months ago|{{{1}}}}}<!--
-->}}<!--
-->}}<!--
-->{{#ifeq:{{yesno|{{{paren|{{{p|no}}}}}}}}|yes|)}}</span><!--
-->|{{Error|Error: first parameter is missing.|tag=span}}<!--
-->}}<!--
IMPLEMENTATION OF microformat date classes
--><span style="display:none"> (<span class="{{#ifeq:{{yesno|{{{end|no}}}}}|yes|dtend|bday dtstart published updated}}"><!--
-->{{#if: {{{1|}}}<!--
-->|{{{1}}}<!--
-->{{#if: {{{2|}}}<!--
-->| -{{#time:m|1-{{trim|{{{2}}}}}-1}}<!--
-->{{#if: {{{3|}}}<!--
-->| -{{padleft:{{{3}}}|2|0}}<!--
-->}}<!--
-->}}<!--
-->}}<!--
--></span>)</span></includeonly><noinclude>
{{documentation}}
</noinclude>