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
(some updates)
 
Line 1: Line 1:
 
<includeonly>{{#if: {{{crafting time|}}}
 
<includeonly>{{#if: {{{crafting time|}}}
| {{#arraydefine:craftingTime|{{{crafting time}}}}} Expires in : {{#ifexpr: {{#arrayindex:craftingTime|0|0}}>0|{{#vardefine:comma|1}}{{#arrayindex:craftingTime |0 }} day(s) }}{{#ifexpr: {{#arrayindex:craftingTime|1|0}}>0|{{#if: {{#var:comma}}|,<nowiki> </nowiki>|{{#vardefine:comma|1}}}}{{#arrayindex:craftingTime|1}} hour(s) }}{{#ifexpr: {{#arrayindex:craftingTime|2|0}}>0|{{#if: {{#var:comma}}|,<nowiki> </nowiki>|{{#vardefine:comma|1}}}}{{#arrayindex:craftingTime|2 }} minute(s)}}{{#ifexpr: {{#arrayindex:craftingTime|3|0}}>0|{{#if: {{#var:comma}}|,<nowiki> </nowiki>|{{#vardefine:comma|1}}}}{{#arrayindex:craftingTime |3 }} second(s)}} }}</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

Latest revision as of 20: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)