thrimbletrimmer: Parse durations as HH[:MM[:SS]] instead of [[HH:]MM:]SS

ie. 1:00 is 1 hour, not 1 minute.

This is consistent with our use of bustime everywhere else.
pull/134/head
Mike Lang 5 years ago
parent a6ee746e6b
commit 26f91a02ea

@ -79,8 +79,7 @@ parseDuration = function(duration) {
direction = -1;
}
var parts = duration.split(':');
parts.reverse();
return (parseInt(parts[2] || "0") + (parts[1] || "0")/60 + parts[0]/3600) * 60 * 60 * direction;
return (parseInt(parts[0]) + (parts[1] || "0")/60 + (parts[2] || "0")/3600) * 60 * 60 * direction;
}
toBustime = function(date) {

Loading…
Cancel
Save