require("js-whatever/js/hms-duration-format")(duration, strings) → {string}
Formats a duration as a string comprising of days, hours, minutes and seconds
Parameters:
| Name | Type | Description |
|---|---|---|
duration |
number | The duration to format, in seconds |
strings |
DurationFormatStrings | Formatting strings to use |
- Source:
Returns:
The duration as a formatted string
- Type
- string
Example
hmsDurationFormat(150); // returns '2 mins, 30s' hmsDurationFormat(1246000); //returns '14 days, 10 hours, 6 mins, 40s'
- Source: