Module: js-whatever/js/hms-duration-format

js-whatever/js/hms-duration-format

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:
Copyright 2013-2018 Micro Focus International plc. Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
Documentation generated by JSDoc 3.4.3 on Thu Jun 21st 18:04 2018 using the DocStrap template.