From 0c67821171b07a6b1385cc4c085b43f32fdb51db Mon Sep 17 00:00:00 2001 From: SNoiraud Date: Sun, 20 Mar 2016 13:38:39 +0100 Subject: [PATCH] 8602: Age in the event family view column is wrong. better solution. --- gramps/gen/lib/date.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gramps/gen/lib/date.py b/gramps/gen/lib/date.py index c9f1b520c..5ca8df444 100644 --- a/gramps/gen/lib/date.py +++ b/gramps/gen/lib/date.py @@ -280,9 +280,6 @@ class Span(object): _repr = trans_text("greater than %s years") % Span.ALIVE elif self.date1.get_modifier() == Date.MOD_NONE: if self.date2.get_modifier() == Date.MOD_NONE: - if fdate12[0] == '-': - # a negative age is not realistic - fdate12 = '(' + fdate12[1:].replace('-', '') + ')' _repr = fdate12 elif self.date2.get_modifier() == Date.MOD_BEFORE: _repr = trans_text("more than") + " " + fdate12 @@ -361,7 +358,10 @@ class Span(object): self._format(self._diff(start1, stop2), dlocale) + " " + trans_text("and") + " " + self._format(self._diff(stop1, start2), dlocale)) - return _repr + if _repr.find('-') == -1: # we don't have a negative value to return. + return _repr + else: + return '(' + _repr.replace('-', '') + ')' def __eq__(self, other): """