can died at same year as max_alive
svn: r18316
This commit is contained in:
parent
7c06699fb8
commit
0259a143a0
@ -85,6 +85,7 @@ class Span(object):
|
|||||||
BEFORE = config.get('behavior.date-before-range')
|
BEFORE = config.get('behavior.date-before-range')
|
||||||
AFTER = config.get('behavior.date-after-range')
|
AFTER = config.get('behavior.date-after-range')
|
||||||
ABOUT = config.get('behavior.date-about-range')
|
ABOUT = config.get('behavior.date-about-range')
|
||||||
|
ALIVE = config.get('behavior.max-age-prob-alive')
|
||||||
def __init__(self, date1, date2):
|
def __init__(self, date1, date2):
|
||||||
self.valid = (date1.sortval != 0 and date2.sortval != 0)
|
self.valid = (date1.sortval != 0 and date2.sortval != 0)
|
||||||
self.date1 = date1
|
self.date1 = date1
|
||||||
@ -293,9 +294,8 @@ class Span(object):
|
|||||||
if self.repr is not None:
|
if self.repr is not None:
|
||||||
return self.repr
|
return self.repr
|
||||||
elif self.valid:
|
elif self.valid:
|
||||||
ALIVE = config.get('behavior.max-age-prob-alive')
|
if self._diff(self.date1, self.date2)[0] > Span.ALIVE:
|
||||||
if self._diff(self.date1, self.date2)[0] >= ALIVE:
|
return _("less than %s years") % Span.ALIVE
|
||||||
return _("less than %s years") % ALIVE
|
|
||||||
if self.date1.get_modifier() == Date.MOD_NONE:
|
if self.date1.get_modifier() == Date.MOD_NONE:
|
||||||
if self.date2.get_modifier() == Date.MOD_NONE:
|
if self.date2.get_modifier() == Date.MOD_NONE:
|
||||||
#v = self.date1.sortval - self.date2.sortval
|
#v = self.date1.sortval - self.date2.sortval
|
||||||
|
Loading…
Reference in New Issue
Block a user