1
0
mirror of https://github.com/danbee/mpd-client synced 2025-03-04 08:39:09 +00:00
mpd-client/assets/js/helpers/time.js
2014-01-08 11:19:17 +00:00

11 lines
236 B
JavaScript

window.timeHelpers = {
formatLength: function(length) {
var minutes = Math.floor(length / 60);
var seconds = length % 60;
if (seconds < 10) {
seconds = '0' + seconds;
}
return minutes + ':' + seconds;
}
};