format-time.js
Methods
-
inner formatTime(seconds, guide) → {string}
-
Format seconds as a time string, H:MM:SS or M:SS. Supplying a guide (in seconds) will force a number of leading zeros to cover the length of the guide.
Parameters:
Name Type Description seconds
number Number of seconds to be turned into a string
guide
number Number (in seconds) to model the string after
Returns:
string -Time formatted as H:MM:SS or M:SS