Welcome to the DFO World Wiki. With many major updates since the release of DFO, many items are missing. Visit Item Database Project to learn more.
Please remember to click "show preview" before saving the page.
Thanks for the updated logo snafuPop!

Difference between revisions of "User:Dfoplayer/TestTimeFormat"

From DFO World Wiki
Jump to: navigation, search
(Created page with "<includeonly>{{#if: {{{crafting time|}}} | {{#arraydefine:craftingTime|{{{crafting time|}}}| }} Expires in : {{#if: {{#arrayindex:craftingTime|0 }}|{{#arrayindex:craftingTime...")
 
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<includeonly>{{#if: {{{crafting time|}}}
 
<includeonly>{{#if: {{{crafting time|}}}
| {{#arraydefine:craftingTime|{{{crafting time|}}}| }} Expires in : {{#if: {{#arrayindex:craftingTime|0 }}|{{#arrayindex:craftingTime |0 }} days, }}{{#if: {{#arrayindex:craftingTime |1 }}|{{#arrayindex:craftingTime |1 }} hours, }}{{#if: {{#arrayindex:craftingTime |2 }}|{{#arrayindex:craftingTime |2 }} minutes, }}{{#if: {{#arrayindex:craftingTime|3|}}|{{#arrayindex:craftingTime |3 }}seconds}} }}</includeonly><noinclude>
+
| {{#arraydefine:craftingTime|{{{crafting time}}}}}
 +
Expires in : {{#ifexpr: {{#arrayindex:craftingTime|0|0}}>0|{{#vardefine:comma1|1}}{{#arrayindex:craftingTime |0 }} day(s) }}{{#ifexpr: {{#arrayindex:craftingTime|1|0}}>0|{{#varexists:comma1|,<nowiki> </nowiki>}}{{#vardefine:comma2|1}}{{#arrayindex:craftingTime|1}} hour(s) }}{{#ifexpr: {{#arrayindex:craftingTime|2|0}}>0|{{#varexists:comma2|,<nowiki> </nowiki>}}{{#vardefine:comma3|1}}{{#arrayindex:craftingTime|2}} minute(s)}}{{#ifexpr: {{#arrayindex:craftingTime|3|0}}>0|{{#varexists:comma3|,<nowiki> </nowiki>}}{{#arrayindex:craftingTime|3}} second(s)}} }}</includeonly><noinclude>
 +
Ignore the extra commas. That's cause on this page, we have multiple variables defined from previous template usage.
 
<pre>{{User:Dfoplayer/TestTimeFormat
 
<pre>{{User:Dfoplayer/TestTimeFormat
 
| crafting time = 01}}</pre>{{User:Dfoplayer/TestTimeFormat
 
| crafting time = 01}}</pre>{{User:Dfoplayer/TestTimeFormat
Line 6: Line 8:
  
 
<pre>{{User:Dfoplayer/TestTimeFormat
 
<pre>{{User:Dfoplayer/TestTimeFormat
| crafting time = 01 02}}</pre>{{User:Dfoplayer/TestTimeFormat
+
| crafting time = 01,02}}</pre>{{User:Dfoplayer/TestTimeFormat
| crafting time = 01 02}}
+
| crafting time = 01,02}}
  
 
<pre>{{User:Dfoplayer/TestTimeFormat
 
<pre>{{User:Dfoplayer/TestTimeFormat
| crafting time = 01 02 03}}</pre>{{User:Dfoplayer/TestTimeFormat
+
| crafting time = 01,02,03}}</pre>{{User:Dfoplayer/TestTimeFormat
| crafting time = 01 02 03}}
+
| crafting time = 01,02,03}}
  
 
<pre>{{User:Dfoplayer/TestTimeFormat
 
<pre>{{User:Dfoplayer/TestTimeFormat
| crafting time = 01 02 03 04}}</pre>{{User:Dfoplayer/TestTimeFormat
+
| crafting time = 01,02,03,04}}</pre>{{User:Dfoplayer/TestTimeFormat
| crafting time = 01 02 03 04}}
+
| crafting time = 01,02,03,04}}
 +
 
 +
<pre>{{User:Dfoplayer/TestTimeFormat
 +
| crafting time = 00,02,03,04}}</pre>{{User:Dfoplayer/TestTimeFormat
 +
| crafting time = 00,02,03,04}}
 +
 
 +
<pre>{{User:Dfoplayer/TestTimeFormat
 +
| crafting time = 00,00,03,04}}</pre>{{User:Dfoplayer/TestTimeFormat
 +
| crafting time = 00,00,03,04}}
 +
 
 +
<pre>{{User:Dfoplayer/TestTimeFormat
 +
| crafting time = 00,00,00,04}}</pre>{{User:Dfoplayer/TestTimeFormat
 +
| crafting time = 00,00,00,04}}

Latest revision as of 19:08, 15 June 2021

Ignore the extra commas. That's cause on this page, we have multiple variables defined from previous template usage.

{{User:Dfoplayer/TestTimeFormat
| crafting time = 01}}

Expires in : 01 day(s)

{{User:Dfoplayer/TestTimeFormat
| crafting time = 01,02}}

Expires in : 01 day(s), 02 hour(s)

{{User:Dfoplayer/TestTimeFormat
| crafting time = 01,02,03}}

Expires in : 01 day(s), 02 hour(s), 03 minute(s)

{{User:Dfoplayer/TestTimeFormat
| crafting time = 01,02,03,04}}

Expires in : 01 day(s), 02 hour(s), 03 minute(s), 04 second(s)

{{User:Dfoplayer/TestTimeFormat
| crafting time = 00,02,03,04}}

Expires in : , 02 hour(s), 03 minute(s), 04 second(s)

{{User:Dfoplayer/TestTimeFormat
| crafting time = 00,00,03,04}}

Expires in : , 03 minute(s), 04 second(s)

{{User:Dfoplayer/TestTimeFormat
| crafting time = 00,00,00,04}}

Expires in : , 04 second(s)