Fixed error in computing days of a date diff span
svn: r13661
This commit is contained in:
parent
2ed9ac56e4
commit
d004430882
@ -270,12 +270,12 @@ class Span(object):
|
|||||||
|
|
||||||
def __int__(self):
|
def __int__(self):
|
||||||
"""
|
"""
|
||||||
Returns the number of months of span.
|
Returns the number of days of span.
|
||||||
"""
|
"""
|
||||||
if self.negative:
|
if self.negative:
|
||||||
return -(self.sort[0] * 12 + self.sort[1])
|
return -(self.sort[0] + self.sort[1])
|
||||||
else:
|
else:
|
||||||
return (self.sort[0] * 12 + self.sort[1])
|
return (self.sort[0] + self.sort[1])
|
||||||
|
|
||||||
def __cmp__(self, other):
|
def __cmp__(self, other):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user