forked from 0x2620/oxjs
change the signature of Ox.pad to match Ox.truncate
This commit is contained in:
parent
24bbf95bd5
commit
a5c6747b57
10 changed files with 62 additions and 29 deletions
|
|
@ -553,7 +553,7 @@ Ox.formatDuration = function(seconds/*, decimals, format*/) {
|
|||
return Ox.filter(Ox.map(values, function(value, index) {
|
||||
var ret;
|
||||
if (format == 'none') {
|
||||
ret = Ox.pad(value, pad[index]);
|
||||
ret = Ox.pad(value, 'left', pad[index], '0');
|
||||
} else if (Ox.isNumber(value) ? value : parseFloat(value)) {
|
||||
ret = value + (format == 'long' ? ' ' : '') + string[index]
|
||||
+ (format == 'long' && value != 1 ? 's' : '');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue