Clean up some date related problems.

svn: r622
This commit is contained in:
David Hampton
2001-12-16 02:21:05 +00:00
parent 2b556fe523
commit 87e22d7fac
10 changed files with 86 additions and 52 deletions

View File

@@ -687,10 +687,10 @@ def probably_alive(person):
if death.getDate() != "":
return 0
if birth.getDate() != "":
year = birth.getDateObj().get_start_date().getYear()
year = birth.getDateObj().get_start_date()
time_struct = time.localtime(time.time())
current_year = time_struct[0]
if year != -1 and current_year - year > 110:
if year.getYearValid() and current_year - year.getYear() > 110:
return 0
return 1