Fixed date comparison where one date is not in a valid date format

svn: r534
This commit is contained in:
Don Allingham 2001-11-01 03:15:41 +00:00
parent 021044856a
commit 756fbc2fc4

View File

@ -1052,6 +1052,11 @@ class SingleDate:
#
#-------------------------------------------------------------------------
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()
second = s.get_start_date()
if first.year != second.year: