Span maximums and minimums must always be positive numbers

svn: r22657
This commit is contained in:
Paul Franklin 2013-07-08 01:44:32 +00:00
parent 700cddf453
commit 75efe4f5d7

View File

@ -203,8 +203,8 @@ class Span(object):
start, stop = self.date1.get_start_stop_range() start, stop = self.date1.get_start_stop_range()
start = Date(*start) start = Date(*start)
stop = Date(*stop) stop = Date(*stop)
v1 = self.date2.sortval - start.sortval # min v1 = start.sortval - self.date2.sortval # min
v2 = self.date2.sortval - stop.sortval # max v2 = stop.sortval - self.date2.sortval # max
self.sort = (v1, v2 - v1) self.sort = (v1, v2 - v1)
self.minmax = (v1, v2) self.minmax = (v1, v2)
elif self.date2.get_modifier() == Date.MOD_BEFORE: elif self.date2.get_modifier() == Date.MOD_BEFORE: