Difference between revisions of "Template:Time"

From RimWorld Wiki
Jump to navigation Jump to search
Line 6: Line 6:
 
}}{{#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}}

Revision as of 11:55, 28 March 2015

14d 0 6h 56m 0 7s