changeset 21:a531adbda6f7

A 'day' is now 12 hours; items that are more than 9 'days' old are still displayed now.
author Atul Varma <varmaa@toolness.com>
date Mon, 02 Mar 2009 17:44:19 -0800
parents a2ec16ff4a22
children 98b8ae7e21a6
files about-mozilla.js
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/about-mozilla.js	Mon Mar 02 17:37:16 2009 -0800
+++ b/about-mozilla.js	Mon Mar 02 17:44:19 2009 -0800
@@ -86,9 +86,11 @@
           var pub = new Date($(this).attr("published"));
           var msAgo = now - pub;
           var hoursAgo = msAgo / (1000 * 60 * 60);
-          var daysAgo = Math.floor(hoursAgo / 24);
+          var daysAgo = Math.floor(hoursAgo / 12);
           if (daysAgo < 0)
             daysAgo = 0;
+          if (daysAgo > 9)
+            daysAgo = 9;
           var div = $(".days-ago-" + daysAgo, content);
           div.append(this);
         }