$NetBSD: patch-ab,v 1.3 2011/12/05 10:18:17 wiz Exp $ --- htsearch/Display.cc.orig 2009-01-17 10:05:37.000000000 +0100 +++ htsearch/Display.cc @@ -1541,7 +1541,7 @@ Display::buildMatchList() // seconds in a 365 days year). The formula gives less weight // as the distance between the date document and the current time // increases (the absolute value is for documents with future date) -#define DATE_FACTOR(df, n, dd) ((df) * 100 / (1+(double)(abs((n) - (dd)) / 31536000))) +#define DATE_FACTOR(df, n, dd) ((df) * 100 / (1+(double)(abs((int)((n) - (dd))) / 31536000))) date_score = DATE_FACTOR(date_factor, now, thisRef->DocTime()); score += date_score; }