From 9302411eb4705f7ba70fa8d9ac96b18f5ae58a14 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Thu, 1 Apr 2010 01:09:13 +0000 Subject: [PATCH] 0003734: [Calendars] Only add persons whose birth date is year/01/01 on the first january svn: r14982 --- src/plugins/webreport/WebCal.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/plugins/webreport/WebCal.py b/src/plugins/webreport/WebCal.py index 69c80fc81..f02179a6f 100644 --- a/src/plugins/webreport/WebCal.py +++ b/src/plugins/webreport/WebCal.py @@ -1105,11 +1105,12 @@ class WebCalReport(Report): birth_date = birth_event.get_date_object() # determine birthday information??? - if (self.birthday and birth_date is not Date.EMPTY): + if (self.birthday and birth_date is not Date.EMPTY + and birth_date.is_valid()): year = birth_date.get_year() or this_year - month = birth_date.get_month() or 1 - day = birth_date.get_day() or 1 + month = birth_date.get_month() + day = birth_date.get_day() # date to figure if someone is still alive # current year of calendar, month nd day is their birth month and birth day @@ -1167,7 +1168,7 @@ class WebCalReport(Report): marriage_event = get_marriage_event(db, fam) if marriage_event: event_date = marriage_event.get_date_object() - if event_date is not Date.EMPTY: + if event_date is not Date.EMPTY and event_date.is_valid(): year = event_date.get_year() month = event_date.get_month() day = event_date.get_day()