From 0259a143a0c666fa565bf54bcb7edc170e3d93cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Rapinat?= Date: Thu, 13 Oct 2011 16:11:06 +0000 Subject: [PATCH] can died at same year as max_alive svn: r18316 --- src/gen/lib/date.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gen/lib/date.py b/src/gen/lib/date.py index 12678813c..af9c2b6b1 100644 --- a/src/gen/lib/date.py +++ b/src/gen/lib/date.py @@ -85,6 +85,7 @@ class Span(object): BEFORE = config.get('behavior.date-before-range') AFTER = config.get('behavior.date-after-range') ABOUT = config.get('behavior.date-about-range') + ALIVE = config.get('behavior.max-age-prob-alive') def __init__(self, date1, date2): self.valid = (date1.sortval != 0 and date2.sortval != 0) self.date1 = date1 @@ -293,9 +294,8 @@ class Span(object): if self.repr is not None: return self.repr elif self.valid: - ALIVE = config.get('behavior.max-age-prob-alive') - if self._diff(self.date1, self.date2)[0] >= ALIVE: - return _("less than %s years") % ALIVE + if self._diff(self.date1, self.date2)[0] > Span.ALIVE: + return _("less than %s years") % Span.ALIVE if self.date1.get_modifier() == Date.MOD_NONE: if self.date2.get_modifier() == Date.MOD_NONE: #v = self.date1.sortval - self.date2.sortval