2003-06-25 Tim Waugh <twaugh@redhat.com>

* src/Date.py: Make sure range is 0 when it should be.  Dates compare
        differently if only one is a range.


svn: r1779
This commit is contained in:
Tim Waugh 2003-06-25 10:55:15 +00:00
parent 477462b908
commit ebd0ed14c9
2 changed files with 8 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2003-06-25 Tim Waugh <twaugh@redhat.com>
* src/Date.py: Make sure range is 0 when it should be. Dates compare
differently if only one is a range.
2003-06-24 Don Allingham <dallingham@users.sourceforge.net>
* src/SubstKeywords.py: Fixed typo on getName
* src/plugins/WriteGedcom.py: Allow iso-8859-1 (ANSI) encoding

View File

@ -199,6 +199,7 @@ class Date:
if match:
matches = match.groups()
self.start.set(matches[1])
self.range = 0
if self.stop == None:
self.stop = SingleDate()
self.stop.calendar = self.calendar
@ -210,6 +211,7 @@ class Date:
if match:
matches = match.groups()
self.start.set(matches[0])
self.range = 0
if self.stop == None:
self.stop = SingleDate()
self.stop.calendar = self.calendar
@ -438,6 +440,8 @@ def compare_dates(f,s):
return cmp(f.text,s.text)
if f.range == -1 or s.range == -1:
return -1
if f.range != s.range:
return 1
first = f.get_start_date()
second = s.get_start_date()