diff --git a/source/Ox/js/Format.js b/source/Ox/js/Format.js index 3e31b9a1..db2042d4 100644 --- a/source/Ox/js/Format.js +++ b/source/Ox/js/Format.js @@ -502,8 +502,6 @@ Ox.formatDuration Formats a duration as a string '01:00:00.00' > Ox.formatDuration(3599.999, 3) '00:59:59.999' - > Ox.formatDuration(1640673) - '18:23:44:31' > Ox.formatDuration(3599.999, 'short') '1h' > Ox.formatDuration(3599.999, 3, 'short') @@ -512,6 +510,8 @@ Ox.formatDuration Formats a duration as a string '1 hour' > Ox.formatDuration(3599.999, 3, 'long') '59 minutes 59.999 seconds' + > Ox.formatDuration(1640673) + '18:23:44:33' > Ox.formatDuration(86520, 2) '1:00:02:00.00' > Ox.formatDuration(86520, 'long') @@ -542,7 +542,7 @@ Ox.formatDuration = function(seconds/*, decimals, format*/) { : [], pad = [ values[0].toString().length, - values[0] ? 3 : 1, + values[0] ? 3 : values[1].toString().length, 2, 2, decimals ? decimals + 3 : 2