Template:Start date and age: Difference between revisions

Nothing to hide, but nothing to show you either.
Jump to navigation Jump to search
Content added Content deleted
(temporarily revert prior change pending update)
(Fix calculation of years or months ago when input is |year|month| (no day) or |year| (no month or day). Allow "p" as parameter name instead of "paren". Use Template:Yesno for optional parameters that current only accept "yes": df, br, p.)
Line 1: Line 1:
<includeonly><!--
<includeonly><!--



IMPLEMENTATION OF DATE
IMPLEMENTATION OF DATE



-->{{#if: {{{1|}}}<!--
-->{{#if: {{{1|}}}<!--
-->|{{#if: {{{2|}}}<!--
-->|{{#if: {{{2|}}}<!--
-->|{{#if: {{{3|}}}<!--
-->|{{#if: {{{3|}}}<!--
-->|{{#ifeq: {{{df|}}}|yes<!--
-->|{{#ifeq:{{yesno|{{{df|no}}}}}|yes<!--
-->|{{#expr:{{{3}}}}}&nbsp;{{MONTHNAME|{{{2}}}}}<!--
-->|{{#expr:{{{3}}}}}&nbsp;{{MONTHNAME|{{{2}}}}}<!--
-->|{{MONTHNAME|{{{2}}}}}&nbsp;{{#expr:{{{3}}}}},<!--
-->|{{MONTHNAME|{{{2}}}}}&nbsp;{{#expr:{{{3}}}}},<!--
-->}} {{{1}}}<!--
-->}} {{{1}}}<!--
-->|{{MONTHNAME|{{{2}}}}}&nbsp;{{{1}}}<!--
-->|{{MONTHNAME|{{{2}}}}}&nbsp;{{{1}}}<!--
-->}}<!--
-->}}<!--
-->|{{{1}}}<!--
-->|{{{1}}}<!--
-->}}<!--
--><span class="noprint">{{#ifeq:{{{paren|}}}|yes||&#059;}}<!--
-->{{#ifeq:{{{br|}}}|yes|<br/>|&#032;}}<!--
-->{{#ifeq:{{{paren|}}}|yes|(}}<!--
-->{{time ago<!--
-->|{{{1}}}<!--
-->-<!--
-->{{{2|{{CURRENTMONTH}}}}}<!--
-->-<!--
-->{{{3|{{CURRENTDAY}}}}}<!--
-->|min_magnitude=days<!--
-->}}<!--
-->}}<!--
-->{{#ifeq:{{{paren|}}}|yes|)}}</span><!--
--><span class="noprint">{{#ifeq:{{yesno|{{{paren|{{{p|no}}}}}}}}|yes||&#059;}}<!--
-->|'''{{color|red|Error: No parameters}}'''<!--
-->{{#ifeq:{{yesno|{{{br|no}}}}}|yes|<br/>|&#032;}}<!--
-->{{#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-{{{2}}}-1}}}}<!--
-->}}<!--
-->|{{#iferror:{{#expr:{{{1}}}}}<!--
-->|{{time ago|{{{1}}}|min_magnitude=days}}<!--
-->|{{years or months ago|{{{1}}}}}<!--
-->}}<!--
-->}}<!--
-->{{#ifeq:{{yesno|{{{paren|{{{p|no}}}}}}}}|yes|)}}</span><!--
-->|'''{{color|red|Error: first parameter is missing.}}'''<!--
-->}}<!--
-->}}<!--



IMPLEMENTATION OF microformat date classes
IMPLEMENTATION OF microformat date classes



--><span style="display:none">&#160;(<span class="bday dtstart published updated"><!--
--><span style="display:none">&#160;(<span class="bday dtstart published updated"><!--
Line 40: Line 38:
-->{{#if: {{{2|}}}<!--
-->{{#if: {{{2|}}}<!--
-->| -{{padleft:{{{2}}}|2|0}}<!--
-->| -{{padleft:{{{2}}}|2|0}}<!--
-->{{#if: {{{3|}}}<!--
-->{{#if: {{{3|}}}<!--
-->| -{{padleft:{{{3}}}|2|0}}<!--
-->| -{{padleft:{{{3}}}|2|0}}<!--
-->}}<!--
-->}}<!--
-->}}<!--
-->}}<!--
-->}}<!--
-->}}<!--
--></span>)</span></includeonly><noinclude>
--></span>)</span></includeonly><noinclude>
{{being merged|2013 July 31|merge=Template:Start date and years ago}}
{{being merged|2013 July 31|merge=Template:Start date and years ago}}

Revision as of 23:54, 4 October 2013

Template:Being merged