0003734: [Calendars] Only add persons whose birth date is year/01/01 on the first january

svn: r14981
This commit is contained in:
Doug Blank 2010-04-01 01:02:55 +00:00
parent ed296c227d
commit 5c4b9e0241

View File

@ -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()