mirror of
https://github.com/danbee/mpd-client
synced 2025-03-04 08:39:09 +00:00
11 lines
236 B
JavaScript
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;
|
|
}
|
|
};
|