From a5ac5605522707d7580f07bb924d7efa177b5ca2 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Fri, 16 Oct 2009 03:20:07 +0000 Subject: [PATCH] Fixed bug in interpreting int(date_span) which is now in months svn: r13377 --- src/plugins/quickview/AgeOnDate.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/quickview/AgeOnDate.py b/src/plugins/quickview/AgeOnDate.py index 2ecfc6f39..162267a7e 100644 --- a/src/plugins/quickview/AgeOnDate.py +++ b/src/plugins/quickview/AgeOnDate.py @@ -70,13 +70,14 @@ def run(database, document, date): diff_span = (date - birth_date) if ((death_date is not None) or (death_date is None and - int(diff_span) <= config.get('behavior.max-age-prob-alive') * 365)): + int(diff_span)/12.0 <= config.get('behavior.max-age-prob-alive') * 365)): birth_str = str(diff_span) birth_sort = int(diff_span) if birth_str != "": stab.row(person, birth_str) stab.row_sort_val(1, diff_span) matches += 1 + sdoc.paragraph(_("\n%d matches.\n") % matches) stab.write(sdoc) sdoc.paragraph("")