]> jfr.im git - irc/quakenet/qwebirc.git/commitdiff
...
authorChris Porter <redacted>
Sun, 19 Oct 2008 01:28:12 +0000 (02:28 +0100)
committerChris Porter <redacted>
Sun, 19 Oct 2008 01:28:12 +0000 (02:28 +0100)
js/irc/irclib.js
js/jslib.js

index 4f178b2d83aa3e927f407549158ffe90fa9574f4..6d88168c2e5210713594a70d070a154307946003 100644 (file)
@@ -61,6 +61,5 @@ qwebirc.irc.IRCTimestamp = function(d) {
 qwebirc.irc.IRCDate = function(d) {
   var pad = qwebirc.util.pad;
   
-  alert(qwebirc.util.DaysOfWeek[d.getDay()]);
   return qwebirc.util.DaysOfWeek[d.getDay()] + " " + qwebirc.util.MonthsOfYear[d.getMonth()] + " " + pad(d.getDate()) + " "  + pad(d.getHours()) + ":" + pad(d.getMinutes()) + ":" + pad(d.getSeconds()) + " " + d.getFullYear();
 }
index dd828df1425c1c4474d907ebf05e26078a102cbe..17ebc27b414245a8393b4c3e50faea821c5c8484 100644 (file)
@@ -107,9 +107,9 @@ qwebirc.util.NBSPCreate = function(text, element) {
 
 qwebirc.util.longtoduration = function(l) {
   var seconds = l % 60;
-  var minutes = Math.round(l / 60);
-  var hours = Math.round(minutes / 60);
-  var days = Math.round(hours / 24);
+  var minutes = Math.round((l % 3600) / 60);
+  var hours = Math.round((l % (3600 * 24)) / 3600);
+  var days = Math.round(l / (24*3600));
   
   return days + " days " + hours + " hours " + minutes + " minutes " + seconds + " seconds";
 }