fix the '2 week ago' problem
authorBryan Clark <clarkbw@gnome.org>
Thu, 26 Feb 2009 14:28:35 -0800
changeset 58 163542f70b944b239e2a96ba8025b325120b346c
parent 57 f8630c9c5b5e7069b370796c5099d0ed8f9e9f3d
child 59 e75fd7ac3ee1687f1f31faec2876d2b5f97c4d55
push id1
push userroot
push dateWed, 08 Apr 2009 01:46:05 +0000
fix the '2 week ago' problem
client/utils.js
--- a/client/utils.js
+++ b/client/utils.js
@@ -13,17 +13,17 @@ function makeDateFriendly(date) {
 	return day_diff == 0 && (
 			diff < 60 && "just now" ||
 			diff < 120 && "1 minute ago" ||
 			diff < 3600 && Math.floor( diff / 60 ) + " minutes ago" ||
 			diff < 7200 && "1 hour ago" ||
 			diff < 86400 && Math.floor( diff / 3600 ) + " hours ago") ||
 		day_diff == 1 && "Yesterday" ||
 		day_diff < 7 && day_diff + " days ago" ||
-		day_diff < 14 && Math.ceil( day_diff / 7 ) + " week ago" ||
+		day_diff < 8 && Math.ceil( day_diff / 7 ) + " week ago" ||
 		day_diff < 31 && Math.ceil( day_diff / 7 ) + " weeks ago" ||
 		day_diff < 62 && Math.floor( day_diff / 31 ) + " month ago" ||
 		day_diff < 365 && Math.ceil( day_diff / 31 ) + " months ago";
 
   return date.toString();
 }
 
 function makeFriendlyName(name)