Fix for #2303: plugins/Det*Report.py use an outdated method of computing ages. This fix brings it up to date, but needs some additional work once date spans can fully repr themselves.

svn: r11549
This commit is contained in:
Doug Blank
2008-12-31 14:49:24 +00:00
parent 7d1f63341a
commit 6d2cc418e4
4 changed files with 44 additions and 77 deletions

View File

@@ -250,9 +250,9 @@ class DetAncestorReport(Report):
if text:
self.doc.write_text(text)
age,units = self.calc_age(person)
span = self.calc_age(person)
text = ReportUtils.died_str(self.database, person, first, self.verbose,
self.EMPTY_DATE, self.EMPTY_PLACE, age, units)
self.EMPTY_DATE, self.EMPTY_PLACE, span)
if text:
death_ref = person.get_death_ref()
if death_ref:
@@ -629,10 +629,10 @@ class DetAncestorReport(Report):
self.doc.write_text(text)
print_name = 0
age, units = self.calc_age(ind)
span = self.calc_age(ind)
text = ReportUtils.died_str(self.database, ind, print_name,
self.verbose, self.EMPTY_DATE, self.EMPTY_PLACE,
age, units)
span)
if text:
self.doc.write_text(text)
print_name = 0
@@ -671,7 +671,7 @@ class DetAncestorReport(Report):
if self.calcageflag:
return ReportUtils.old_calc_age(self.database,ind)
else:
return (0,0)
return None
def endnotes(self, obj):
if not obj or not self.inc_sources:

View File

@@ -532,9 +532,9 @@ class DetDescendantReport(Report):
if text:
self.doc.write_text(text)
age,units = self.calc_age(person)
span = self.calc_age(person)
text = ReportUtils.died_str(self.database, person, first, self.verbose,
self.EMPTY_DATE, self.EMPTY_PLACE, age, units)
self.EMPTY_DATE, self.EMPTY_PLACE, span)
if text:
death_ref = person.get_death_ref()
if death_ref:
@@ -646,7 +646,7 @@ class DetDescendantReport(Report):
if self.calcageflag:
return ReportUtils.old_calc_age(self.database, ind)
else:
return (0, 0)
return None
def endnotes(self, obj):
if not obj or not self.inc_sources: