ARK: Survival Evolved Wiki
m (1 revisión importada: Templates)
Game widow (discusión | contribuciones)
Línea 1: Línea 1:
<includeonly>{{#vardefine:input|{{{1|}}}}}{{#vardefine:time|{{#var:input}}}}{{#vardefine:days|{{#expr:({{#var:time}} - {{#var:time}} mod 86400) / 86400}}}}{{#vardefine:time|{{#expr:{{#var:time}} - {{#var:days}} * 86400}}}}{{#vardefine:hours|{{#expr:({{#var:time}} - {{#var:time}} mod 3600) / 3600}}}}{{#vardefine:time|{{#expr:{{#var:time}} - {{#var:hours}} * 3600}}}}{{#vardefine:minutes|{{#expr:({{#var:time}} - {{#var:time}} mod 60) / 60}}}}{{#vardefine:seconds|{{#expr:{{#var:time}} - {{#var:minutes}} * 60}}}}{{#ifexpr: {{#var:input}} >= 86400 | {{#var:days}}d }} {{#ifexpr: {{#var:input}} >= 3600 | {{#ifexpr: {{#var:hours}} > 0 | {{#var:hours}}h | }} }} {{#ifexpr: {{#var:input}} >= 60 | {{#ifexpr: {{#var:minutes}} > 0 | {{#var:minutes}}m | }} }} {{#ifexpr: {{#var:seconds}} < 60 | {{#ifexpr: {{#var:seconds}} > 0 | {{#var:seconds}}s | }} | }}</includeonly><noinclude>
+
<includeonly>{{#vardefine:input|{{{1|}}}}}{{#vardefine:time|{{#var:input}}}}{{#vardefine:days|{{#expr:({{#var:time}} - {{#var:time}} mod 86400) / 86400}}}}{{#vardefine:time|{{#expr:{{#var:time}} - {{#var:days}} * 86400}}}}{{#vardefine:hours|{{#expr:({{#var:time}} - {{#var:time}} mod 3600) / 3600}}}}{{#vardefine:time|{{#expr:{{#var:time}} - {{#var:hours}} * 3600}}}}{{#vardefine:minutes|{{#expr:({{#var:time}} - {{#var:time}} mod 60) / 60}}}}{{#vardefine:seconds|{{#expr:{{#var:time}} - {{#var:minutes}} * 60}}}}{{#ifexpr: {{#var:input}} >= 86400 | {{#var:days}}d }} {{#ifexpr: {{#var:input}} >= 3600 | {{#ifexpr: {{#var:hours}} > 0 | {{#var:hours}}h | }} }} {{#ifexpr: {{#var:input}} >= 60 | {{#ifexpr: {{#var:minutes}} > 0 | {{#var:minutes}}m | }} }} {{#ifexpr: {{#var:seconds}} < 60 | {{#ifexpr: {{#var:seconds}} > 0 | {{#var:seconds}}s | }} | }}</includeonly><noinclude>{{doc}}
== Documentation ==
 
Formats a duration given in seconds.
 
   
  +
[[Categoría:Plantillas de formato‎]]</noinclude>
===Usage===
 
<nowiki>{{duration|s}}</nowiki>
 
===Examples===
 
* <code><nowiki>{{duration|20}}</nowiki></code> creates {{duration|20}}
 
* <code><nowiki>{{duration|140}}</nowiki></code> creates {{duration|140}}
 
* <code><nowiki>{{duration|86406}}</nowiki></code> creates {{duration|86406}}
 
 
[[Category:Formatting templates]]</noinclude>
 

Revisión del 23:07 4 ene 2017

Template-info.png Documentación

Formats a duration given in seconds.

Usage

{{duration|s}}

Examples

  • {{duration|20}} creates 20s
  • {{duration|140}} creates 2m 20s
  • {{duration|86406}} creates 1d 6s