Template:Time: Difference between revisions

From Melvor Idle
No edit summary
No edit summary
Line 1: Line 1:
Takes in a number of seconds and converts it into "X days, X hours, X minutes, X seconds"
Takes in a number of seconds and converts it into "X days, X hours, X minutes, X seconds"
For example, {{T|Time|90135}} becomes {{Time|90135}}, {{T|Time|90135|hms=True}} becomes {{Time|90135|hms=True}}.
For example, {{T|Time|90135}} becomes {{Time|90135}}, {{T|Time|90135|hms=true}} becomes {{Time|90135|hms=true}}.


This uses a function inside of [[Module:Common]].<onlyinclude><includeonly>{{#invoke:common|prettyPrintTime|{{{1}}}|hms={{{hms}}}}}</includeonly></onlyinclude>
This uses a function inside of [[Module:Common]].<onlyinclude><includeonly>{{#invoke:Time|prettyPrintTime|{{{1}}}|hms={{{hms}}}}}</includeonly></onlyinclude>

Revision as of 16:53, 1 April 2024

Takes in a number of seconds and converts it into "X days, X hours, X minutes, X seconds" For example, {{Time|90135}} becomes Script error: The function "prettyPrintTime" does not exist., {{Time|90135|hms=true}} becomes Script error: The function "prettyPrintTime" does not exist..

This uses a function inside of Module:Common.