From e6d7fe7520a828043f252beb3f861e008d0b0132 Mon Sep 17 00:00:00 2001 From: stefanp Date: Mon, 21 Aug 2006 15:57:05 +0000 Subject: [PATCH] workaround for http://helma.org/bugs/show_bug.cgi?id=474 went into the wrong repository: changed the way the number of days is calculated. --- core/Date.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/Date.js b/core/Date.js index 937b34b8..1d386b8a 100644 --- a/core/Date.js +++ b/core/Date.js @@ -10,8 +10,8 @@ * * $RCSfile: Date.js,v $ * $Author: czv $ - * $Revision: 1.5 $ - * $Date: 2006/04/18 13:06:58 $ + * $Revision: 1.2 $ + * $Date: 2006/04/24 07:02:17 $ */ @@ -91,7 +91,7 @@ Date.prototype.getTimespan = function(param) { var result = {isFuture: this > param.date}; var diff = Math.abs(param.date.diff(this)); - var age = {days: Math.floor((diff % Date.ONEMONTH) / Date.ONEDAY), + var age = {days: Math.floor(diff / Date.ONEDAY), hours: Math.floor((diff % Date.ONEDAY) / Date.ONEHOUR), minutes: Math.floor((diff % Date.ONEHOUR) / Date.ONEMINUTE)};