Template:Time: Difference between revisions
From Melvor Idle
ByteFoolish (talk | contribs) (Make text and example match) |
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}} | 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> |
Revision as of 16:29, 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.