ARK: Survival Evolved Wiki
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>{{doc}}
+
<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}}
[[Categoría:Plantillas de formato‎]]</noinclude>
 
  +
 
[[Categoría:Plantillas de formato‎]]
  +
[en:Template:Duration]]</noinclude>

Revisión del 16:27 7 dic 2020


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


[en:Template:Duration]]