Human Readable Time

1
2
3
4
5
6
function humanReadable(seconds) {
return [seconds / 3600, seconds % 3600 / 60, seconds % 60].map(function(v) {
v = Math.floor(v).toString();
return v.length == 1 ? '0' + v : v;
}).join(':');
}