Difference between revisions of "Template:Timespan"
From Space Engineers Wiki
Vox Serico (talk | contribs) (Takes a duration in seconds and formats it.) |
Vox Serico (talk | contribs) (Unit in singular when the value is equal to 1) |
||
(4 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
Takes a duration in seconds and formats it. | Takes a duration in seconds and formats it. | ||
− | -->{{#ifexpr:{{{ | + | -->{{#ifexpr:{{{1|0}}} >= 86400|{{#expr: floor ({{{1|0}}}/86400)}} day{{#ifeq:{{#expr: floor ({{{1|0}}}/86400)}}|1||s}}, }}<!-- |
− | -->{{#ifexpr:{{{ | + | -->{{#ifexpr:{{{1|0}}} >= 3600|{{#expr: {{{1|0}}}/3600 mod 24}} hour{{#ifeq:{{#expr: {{{1|0}}}/3600 mod 24}}|1||s}}, }}<!-- |
− | -->{{#ifexpr:{{{ | + | -->{{#ifexpr:{{{1|0}}} >= 60|{{#expr: {{{1|0}}}/60 mod 60}} minute{{#ifeq:{{#expr: {{{1|0}}}/60 mod 60}}|1||s}} and }}<!-- |
− | -->{{#expr: {{{ | + | -->{{#expr: {{{1|0}}} mod 60}} second{{#ifeq:{{#expr: {{{1|0}}} mod 60}}|1||s}}<!-- |
--><noinclude>[[Category:Templates]]</noinclude> | --><noinclude>[[Category:Templates]]</noinclude> |
Latest revision as of 20:58, 9 February 2021
0 seconds