From bfeeb3392cb19b4953fba5277d407eac039fb053 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96man?= Date: Sat, 4 Jul 2009 05:28:01 +0000 Subject: [PATCH] Use Math.floor() instead of parseInt(). Should fix ugly errors in EPG ticket #69 --- src/webui/static/app/epg.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/webui/static/app/epg.js b/src/webui/static/app/epg.js index 954db0ca..acd27272 100644 --- a/src/webui/static/app/epg.js +++ b/src/webui/static/app/epg.js @@ -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';