Fixed bug in interpreting int(date_span) which is now in months
svn: r13377
This commit is contained in:
parent
468be7a75c
commit
a5ac560552
@ -70,13 +70,14 @@ def run(database, document, date):
|
|||||||
diff_span = (date - birth_date)
|
diff_span = (date - birth_date)
|
||||||
if ((death_date is not None) or
|
if ((death_date is not None) or
|
||||||
(death_date is None and
|
(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_str = str(diff_span)
|
||||||
birth_sort = int(diff_span)
|
birth_sort = int(diff_span)
|
||||||
if birth_str != "":
|
if birth_str != "":
|
||||||
stab.row(person, birth_str)
|
stab.row(person, birth_str)
|
||||||
stab.row_sort_val(1, diff_span)
|
stab.row_sort_val(1, diff_span)
|
||||||
matches += 1
|
matches += 1
|
||||||
|
|
||||||
sdoc.paragraph(_("\n%d matches.\n") % matches)
|
sdoc.paragraph(_("\n%d matches.\n") % matches)
|
||||||
stab.write(sdoc)
|
stab.write(sdoc)
|
||||||
sdoc.paragraph("")
|
sdoc.paragraph("")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user