From 5c4b9e024101ba663750fc1b87d0e85758ab76ee Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Thu, 1 Apr 2010 01:02:55 +0000 Subject: [PATCH] 0003734: [Calendars] Only add persons whose birth date is year/01/01 on the first january svn: r14981 --- 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 7b6bc3a35..bed49204c 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 gen.lib.Date.EMPTY): + if (self.birthday and birth_date is not gen.lib.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 @@ -1168,7 +1169,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 gen.lib.Date.EMPTY: + if event_date is not gen.lib.Date.EMPTY and event_date.is_valid(): year = event_date.get_year() month = event_date.get_month() day = event_date.get_day()