]> jfr.im git - irc/quakenet/qwebirc.git/blobdiff - js/jslib.js
Fixes issue 37 (rounding up of idle times).
[irc/quakenet/qwebirc.git] / js / jslib.js
index b07fba134c6e3b0b0ab000249975dba4486b7cd7..f9389f4dc998e39a103d7020db08e186f7c795fd 100644 (file)
@@ -102,9 +102,9 @@ qwebirc.util.NBSPCreate = function(text, element) {
 
 qwebirc.util.longtoduration = function(l) {
   var seconds = l % 60;
-  var minutes = Math.round((l % 3600) / 60);
-  var hours = Math.round((l % (3600 * 24)) / 3600);
-  var days = Math.round(l / (24*3600));
+  var minutes = Math.floor((l % 3600) / 60);
+  var hours = Math.floor((l % (3600 * 24)) / 3600);
+  var days = Math.floor(l / (24*3600));
   
   return days + " days " + hours + " hours " + minutes + " minutes " + seconds + " seconds";
 }