Use Math.floor() instead of parseInt(). Should fix ugly errors in EPG

ticket #69
This commit is contained in:
Andreas Öman 2009-07-04 05:28:01 +00:00
parent 5ba7e80e53
commit bfeeb3392c

View file

@ -91,11 +91,11 @@ tvheadend.epg = function() {
}
function renderDuration(value){
value = value / 60; /* Nevermind the seconds */
value = Math.floor(value / 60);
if(value >= 60) {
var min = value % 60;
var hours = parseInt(value / 60);
var hours = Math.floor(value / 60);
if(min == 0) {
return hours + ' hrs';