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