* src/Date.py (get_high_year): Add method to return upper estimate.

* src/AddSpouse.py: Correctly use upper and lower date estimates.
* src/ChooseParents: Correctly use upper and lower date estimates.


svn: r3565
This commit is contained in:
Alex Roitman
2004-09-21 02:10:23 +00:00
parent 7d9e841ff0
commit a133a3d6c0
4 changed files with 25 additions and 8 deletions

View File

@ -367,6 +367,19 @@ class Date:
"""
return self._get_high_item(_POS_RDAY)
def get_high_year(self):
"""
Returns the high year estimate. For compound dates with non-zero
stop year, the stop year is returned. Otherwise, the start year
is returned.
"""
if self.is_compound():
ret = self.get_stop_year()
if ret:
return ret
else:
return self.get_year()
def get_text(self):
"""
Returns the text value associated with an invalid date.