From a11fc4c22868b8345cdedc0fb4663e4adf276f7e Mon Sep 17 00:00:00 2001 From: Vassilii Khachaturov Date: Fri, 27 Sep 2013 23:36:43 +0000 Subject: [PATCH] 7089: fix another similar code in StatisticsChart svn: r23213 --- src/plugins/drawreport/StatisticsChart.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/plugins/drawreport/StatisticsChart.py b/src/plugins/drawreport/StatisticsChart.py index 29cfd39be..aaf8504a2 100644 --- a/src/plugins/drawreport/StatisticsChart.py +++ b/src/plugins/drawreport/StatisticsChart.py @@ -43,7 +43,7 @@ from functools import partial # Person and relation types from gen.lib import Person, FamilyRelType, EventType, EventRoleType -from gen.lib.date import Date +from gen.lib.date import Date, gregorian # gender and report type names from gen.plug.docgen import (FontStyle, ParagraphStyle, GraphicsStyle, FONT_SANS_SERIF, FONT_SERIF, @@ -655,6 +655,7 @@ class Extract(object): if birth: birthdate = birth.get_date_object() if birthdate.get_year_valid(): + birthdate = gregorian(birthdate) year = birthdate.get_year() if not (year >= year_from and year <= year_to): continue @@ -663,8 +664,10 @@ class Extract(object): death = self.get_death(person) if death: deathdate = death.get_date_object() - if deathdate.get_year_valid() and deathdate.get_year() < year_from: - continue + if deathdate.get_year_valid(): + deathdate = gregorian(deathdate) + if deathdate.get_year() < year_from: + continue if not no_years: # do not accept people who are not known to be in range continue