Fixed date comparison where one date is not in a valid date format
svn: r534
This commit is contained in:
parent
021044856a
commit
756fbc2fc4
@ -1052,6 +1052,11 @@ class SingleDate:
|
|||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
def compare_dates(f,s):
|
def compare_dates(f,s):
|
||||||
|
if f.range == -1 and s.range == -1:
|
||||||
|
return cmp(f.text,s.text)
|
||||||
|
if f.range == -1 or s.range == -1:
|
||||||
|
return -1
|
||||||
|
|
||||||
first = f.get_start_date()
|
first = f.get_start_date()
|
||||||
second = s.get_start_date()
|
second = s.get_start_date()
|
||||||
if first.year != second.year:
|
if first.year != second.year:
|
||||||
|
Loading…
Reference in New Issue
Block a user