From 95c3645f13e31456449e3b1842bb4d75db47aca2 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Sat, 15 Dec 2007 15:49:53 +0000 Subject: [PATCH] * src/plugins/WebCal.py: Temp fixes to keep running (bug #1441) 2007-12-15 Douglas S. Blank svn: r9509 --- ChangeLog | 3 +++ src/plugins/WebCal.py | 12 ++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3ea4fee9d..7408e48bc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2007-12-15 Douglas S. Blank + * src/plugins/WebCal.py: Temp fixes to keep running (bug #1441) + 2007-12-15 Douglas S. Blank * src/DataViews/_RelationView.py: Made suggestion by Stian: http://www.gramps-project.org/wiki/index.php?title=GEPS_002:_RelationView_Expand_and_Collapse#User_Contributions diff --git a/src/plugins/WebCal.py b/src/plugins/WebCal.py index 67ce8fa8d..da7793eb0 100644 --- a/src/plugins/WebCal.py +++ b/src/plugins/WebCal.py @@ -118,6 +118,14 @@ _cc = [ 'Creative Commons License - By attribution, Non-commerical, Share-alike', ] +def make_date(year, month, day): + """ + Returns a Date object of the particular year/month/day. + """ + retval = gen.lib.Date() + retval.set_yr_mon_day(year, month, day) + return retval + #------------------------------------------------------------------------ # # WebReport @@ -596,7 +604,7 @@ class WebReport(Report): if birth_ref: birth_event = self.database.get_event_from_handle(birth_ref.ref) birth_date = birth_event.get_date_object() - living = probably_alive(person, self.database, self.Year, 0) + living = probably_alive(person, self.database, make_date(self.Year, 1, 1), 0) if self.Birthday and birth_date != None and ((self.Alive and living) or not self.Alive): year = birth_date.get_year() month = birth_date.get_month() @@ -635,7 +643,7 @@ class WebReport(Report): spouse_name = self.get_short_name(spouse) short_name = self.get_short_name(person) if self.Alive: - if not probably_alive(spouse, self.database, self.Year, 0): + if not probably_alive(spouse, self.database, make_date(self.Year, 1, 1), 0): continue married = True for event_ref in fam.get_event_ref_list():