From 756fbc2fc43d5a64d18889182982e37fa0c334fa Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Thu, 1 Nov 2001 03:15:41 +0000 Subject: [PATCH] Fixed date comparison where one date is not in a valid date format svn: r534 --- gramps/src/Date.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gramps/src/Date.py b/gramps/src/Date.py index dd006f835..ae1f0cdfa 100644 --- a/gramps/src/Date.py +++ b/gramps/src/Date.py @@ -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: