Template:Start date and age: Difference between revisions

From Good Old TV Fan Wiki
m (1 revision imported)
 
GOTV>Wbm1058
(editors are pulling Wikidata to use for this template's parameters and often there is no date in Wikidata. This is considered "normal" so just return a blank when parameters 1, 2 and 3 are missing rather than an error. See Template:Start date and age/testcases#Empty/Missing parameters)
Line 20: Line 20:
       -->|{{#if: {{{3|}}}<!--
       -->|{{#if: {{{3|}}}<!--
           -->|{{time ago|{{{1}}}-{{{2}}}-{{{3}}}|min_magnitude=days}}<!--
           -->|{{time ago|{{{1}}}-{{{2}}}-{{{3}}}|min_magnitude=days}}<!--
           -->|{{years or months ago|{{{1}}}|{{#time:n|1-{{{2}}}-1}}}}<!--
           -->|{{years or months ago|{{{1}}}|{{#time:n|1-{{trim|{{{2}}}}}-1}}}}<!--
           -->}}<!--
           -->}}<!--
       -->|{{#iferror:{{#expr:{{{1}}}}}<!--
       -->|{{#iferror:{{#expr:{{{1}}}}}<!--
Line 28: Line 28:
       -->}}<!--
       -->}}<!--
     -->{{#ifeq:{{yesno|{{{paren|{{{p|no}}}}}}}}|yes|)}}</span><!--
     -->{{#ifeq:{{yesno|{{{paren|{{{p|no}}}}}}}}|yes|)}}</span><!--
   -->|'''{{color|red|Error: first parameter is missing.}}'''<!--
   -->|<!--first parameter is missing.-->{{#if: {{{2|}}}|{{Error|Error: first parameter is missing.|tag=span}}<!--
                                    -->|{{#if: {{{3|}}}|{{Error|Error: first parameter is missing.|tag=span}} }} }}<!--
-->}}<!--
-->}}<!--


Line 37: Line 38:
   -->|{{{1}}}<!--
   -->|{{{1}}}<!--
   -->{{#if: {{{2|}}}<!--
   -->{{#if: {{{2|}}}<!--
     -->| -{{#time:m|1-{{{2}}}-1}}<!--
     -->| -{{#time:m|1-{{trim|{{{2}}}}}-1}}<!--
       -->{{#if: {{{3|}}}<!--
       -->{{#if: {{{3|}}}<!--
         -->| -{{padleft:{{{3}}}|2|0}}<!--
         -->| -{{padleft:{{{3}}}|2|0}}<!--

Revision as of 07:34, 21 July 2022