fix parsing almost 0 duration
This commit is contained in:
parent
8b23fc7db5
commit
1b1c461c42
1 changed files with 4 additions and 0 deletions
|
|
@ -6,6 +6,10 @@ const parseDuration = function(string) {
|
|||
};
|
||||
|
||||
const formatDuration = function(seconds) {
|
||||
if (isString(seconds)) {
|
||||
seconds = parseFloat(seconds)
|
||||
}
|
||||
seconds = seconds.toFixed(3)
|
||||
var parts = [
|
||||
parseInt(seconds / 86400),
|
||||
parseInt(seconds % 86400 / 3600),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue