diff --git a/src/gen/lib/date.py b/src/gen/lib/date.py index 6cef8e7fd..1dc162e93 100644 --- a/src/gen/lib/date.py +++ b/src/gen/lib/date.py @@ -314,7 +314,7 @@ class Span(object): #self.sort = (v, -Span.ABOUT) #self.minmax = (v - Span.ABOUT, v + Span.ABOUT) (year, month, day) = self._diff(self.date1, self.date2) - self.repr = _("age|about") + " " + self._format((year, 0 ,0)) + self.repr = _("age|about") + " " + self._format((year, 0 , 0)) elif (self.date2.get_modifier() == Date.MOD_RANGE or self.date2.get_modifier() == Date.MOD_SPAN): start, stop = self.date2.get_start_stop_range() @@ -336,7 +336,7 @@ class Span(object): #v = self.date1.sortval - self.date2.sortval #self.sort = (v, -Span.BEFORE) #self.minmax = (v, v + Span.BEFORE) - self.repr = _("more than about") + " " + self._format(self._diff(self.date1, self.date2)) + self.repr = self._format((-1, -1 , -1)) elif self.date2.get_modifier() == Date.MOD_AFTER: #v = self.date1.sortval - self.date2.sortval #self.sort = (v, -Span.AFTER) @@ -347,7 +347,7 @@ class Span(object): #self.sort = (v, -Span.ABOUT) #self.minmax = (v - Span.ABOUT, v + Span.ABOUT) (year, month, day) = self._diff(self.date1, self.date2) - self.repr = _("age|about") + " " + self._format((year, 0 ,0)) + self.repr = _("age|about") + " " + self._format((year, 0 , 0)) elif (self.date2.get_modifier() == Date.MOD_RANGE or self.date2.get_modifier() == Date.MOD_SPAN): #v = self.date1.sortval - self.date2.sortval @@ -369,13 +369,13 @@ class Span(object): #v = self.date1.sortval - self.date2.sortval #self.sort = (v, Span.AFTER) #self.minmax = (v, v + Span.AFTER) - self.repr = _("more than") + " " + self._format(self._diff(self.date1, self.date2)) + self.repr = self._format((-1, -1 , -1)) elif self.date2.get_modifier() == Date.MOD_ABOUT: #v = self.date1.sortval - self.date2.sortval #self.sort = (v, -Span.ABOUT) #self.minmax = (v - Span.ABOUT, v + Span.AFTER) (year, month, day) = self._diff(self.date1, self.date2) - self.repr = _("more than about") + " " + self._format((year, 0 ,0)) + self.repr = _("more than about") + " " + self._format((year, 0 , 0)) elif (self.date2.get_modifier() == Date.MOD_RANGE or self.date2.get_modifier() == Date.MOD_SPAN): #v = self.date1.sortval - self.date2.sortval @@ -388,32 +388,32 @@ class Span(object): #self.sort = (v, -Span.ABOUT) #self.minmax = (v - Span.ABOUT, v + Span.ABOUT) (year, month, day) = (self._diff(self.date1, self.date2)) - self.repr = _("age|about") + " " + self._format((year, 0 ,0)) + self.repr = _("age|about") + " " + self._format((year, 0 , 0)) elif self.date2.get_modifier() == Date.MOD_BEFORE: #v = self.date1.sortval - self.date2.sortval #self.sort = (v, -Span.BEFORE) #self.minmax = (v - Span.BEFORE, v + Span.ABOUT) (year, month, day) = self._diff(self.date1, self.date2) - self.repr = _("more than") + " " + self._format((year, 0 ,0)) + self.repr = _("more than") + " " + self._format((year, 0 , 0)) elif self.date2.get_modifier() == Date.MOD_AFTER: #v = self.date1.sortval - self.date2.sortval #self.sort = (v, Span.AFTER) #self.minmax = (v - Span.ABOUT, v + Span.ABOUT) (year, month, day) = self._diff(self.date1, self.date2) - self.repr = _("less than about") + " " + self._format((year, 0 ,0)) + self.repr = _("less than about") + " " + self._format((year, 0 , 0)) elif self.date2.get_modifier() == Date.MOD_ABOUT: #v = self.date1.sortval - self.date2.sortval #self.sort = (v, -Span.ABOUT) #self.minmax = (v - Span.ABOUT, v + Span.ABOUT) (year, month, day) = self._diff(self.date1, self.date2) - self.repr = _("age|about") + " " + self._format((year, 0 ,0)) + self.repr = _("age|about") + " " + self._format((year, 0 , 0)) elif (self.date2.get_modifier() == Date.MOD_RANGE or self.date2.get_modifier() == Date.MOD_SPAN): #v = self.date1.sortval - self.date2.sortval #self.sort = (v, -Span.ABOUT) #self.minmax = (v - Span.ABOUT, v + Span.ABOUT) (year, month, day) = self._diff(self.date1, self.date2) - self.repr = _("age|about") + " " + self._format((year, 0 ,0)) + self.repr = _("age|about") + " " + self._format((year, 0 , 0)) elif (self.date1.get_modifier() == Date.MOD_RANGE or self.date1.get_modifier() == Date.MOD_SPAN): # SPAN---------------------------- if self.date2.get_modifier() == Date.MOD_NONE: @@ -441,7 +441,7 @@ class Span(object): #self.sort = (v, -Span.ABOUT) #self.minmax = (v - Span.ABOUT, v + Span.ABOUT) (year, month, day) = self._diff(self.date1, self.date2) - self.repr = _("age|about") + " " + self._format((year, 0 ,0)) + self.repr = _("age|about") + " " + self._format((year, 0 , 0)) elif (self.date2.get_modifier() == Date.MOD_RANGE or self.date2.get_modifier() == Date.MOD_SPAN): start1, stop1 = self.date1.get_start_stop_range()