Difference between revisions of "Template:Convert time"
Jump to navigation
Jump to search
(creation) |
m (Protected "Template:Convert time" ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only autoconfirmed users] (indefinite))) |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly>{{#vardefine:c-seconds|{{#expr: {{{1|0}}} - {{#vardefineecho:c-minutes|{{#expr: floor({{{1|0}}}/60)}}}}}}}}{{#ifeq:{{#var:c-minutes|0}}|0||{{#var:c-minutes}}m}}{{#ifeq:{{#var:c-seconds|0}}|0||{{#var:c-seconds}}s}}</includeonly><noinclude> | <includeonly>{{#vardefine:c-seconds|{{#expr: {{{1|0}}} - {{#vardefineecho:c-minutes|{{#expr: floor({{{1|0}}}/60)}}}}*60}}}}{{#ifeq:{{#var:c-minutes|0}}|0||{{#var:c-minutes}}m}}{{#ifeq:{{#var:c-seconds|0}}|0||{{#var:c-seconds}}s}}</includeonly><noinclude> | ||
== Description == | == Description == | ||
Converts units of time. | Converts units of time. | ||
Line 14: | Line 14: | ||
<pre>{{Convert time|75}}</pre> | <pre>{{Convert time|75}}</pre> | ||
{{Convert time|75}} | {{Convert time|75}} | ||
<pre>{{Convert time|25}}</pre> | |||
{{Convert time|25}} | |||
<pre>{{Convert time|94}}</pre> | |||
{{Convert time|94}} | |||
[[Category:Formatting templates]]</noinclude> | [[Category:Formatting templates]]</noinclude> |
Latest revision as of 14:25, 31 August 2018
Description
Converts units of time.
{{Convert time|<source>}}
Parameters
- unnamed parameter 1
- Source time.
- unnamed parameter 2
- Optional. Conversion rule. Defaults to convert second to minute. (under construction)
Examples
{{Convert time|75}}
1m15s
{{Convert time|25}}
25s
{{Convert time|94}}
1m34s