Difference between revisions of "Template:Time"

From RimWorld Wiki
Jump to navigation Jump to search
(Created page with "{{ #vardefine: fullseconds | {{{1|1234567}}} }}{{#vardefine: fullminutes | {{#expr: floor ({{#var:fullseconds }} / 60) }} }}{{#vardefine: fullhours | {{#expr: floor ({{#var...")
 
m (Changed Category)
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{  #vardefine: fullseconds | {{{1|1234567}}}
+
<noinclude>
 +
{{Modal mark for deletion}}
 +
</noinclude>
 +
{{  #vardefine: fullseconds | {{#expr: floor ({{{1|1234567}}}) }}
 
}}{{#vardefine: fullminutes | {{#expr: floor ({{#var:fullseconds }} / 60) }}
 
}}{{#vardefine: fullminutes | {{#expr: floor ({{#var:fullseconds }} / 60) }}
 
}}{{#vardefine: fullhours  | {{#expr: floor ({{#var:fullminutes }} / 60) }}
 
}}{{#vardefine: fullhours  | {{#expr: floor ({{#var:fullminutes }} / 60) }}
Line 6: Line 9:
 
}}{{#vardefine: minutes    | {{#expr: {{#var:fullminutes }} - {{#var:fullhours  }} * 60 }}
 
}}{{#vardefine: minutes    | {{#expr: {{#var:fullminutes }} - {{#var:fullhours  }} * 60 }}
 
}}{{#vardefine: hours      | {{#expr: {{#var:fullhours  }} - {{#var:days        }} * 24 }}
 
}}{{#vardefine: hours      | {{#expr: {{#var:fullhours  }} - {{#var:days        }} * 24 }}
}}{{ #if: {{#var:days      }} |       {{formatnum: {{#var:days  }} }}d
+
}}{{ #ifexpr: {{#var:days      }} > 0 |     {{formatnum: {{#var:days  }}}}d
}} {{#if: {{#var:fullhours  }} | {{00| {{formatnum: {{#var:hours  }} }}|h}}
+
}} {{#ifexpr: {{#var:fullhours  }} > 0 |{{00|{{formatnum: {{#var:hours  }}}}|h}}
}} {{#if: {{#var:fullminutes}} | {{00| {{formatnum: {{#var:minutes}} }}|m}}
+
}} {{#ifexpr: {{#var:fullminutes}} > 0 |{{00|{{formatnum: {{#var:minutes}}}}|m}}
}}                               {{00| {{formatnum: {{#var:seconds}} }}|s}}
+
}}                                     {{00|{{formatnum: {{#var:seconds}}}}|s}}

Latest revision as of 04:50, 4 June 2020

14d 06h 56m 07s