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:
parent
96111e686a
commit
522ca62853
@ -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>
|
2003-06-24 Don Allingham <dallingham@users.sourceforge.net>
|
||||||
* src/SubstKeywords.py: Fixed typo on getName
|
* src/SubstKeywords.py: Fixed typo on getName
|
||||||
* src/plugins/WriteGedcom.py: Allow iso-8859-1 (ANSI) encoding
|
* src/plugins/WriteGedcom.py: Allow iso-8859-1 (ANSI) encoding
|
||||||
|
@ -199,6 +199,7 @@ class Date:
|
|||||||
if match:
|
if match:
|
||||||
matches = match.groups()
|
matches = match.groups()
|
||||||
self.start.set(matches[1])
|
self.start.set(matches[1])
|
||||||
|
self.range = 0
|
||||||
if self.stop == None:
|
if self.stop == None:
|
||||||
self.stop = SingleDate()
|
self.stop = SingleDate()
|
||||||
self.stop.calendar = self.calendar
|
self.stop.calendar = self.calendar
|
||||||
@ -210,6 +211,7 @@ class Date:
|
|||||||
if match:
|
if match:
|
||||||
matches = match.groups()
|
matches = match.groups()
|
||||||
self.start.set(matches[0])
|
self.start.set(matches[0])
|
||||||
|
self.range = 0
|
||||||
if self.stop == None:
|
if self.stop == None:
|
||||||
self.stop = SingleDate()
|
self.stop = SingleDate()
|
||||||
self.stop.calendar = self.calendar
|
self.stop.calendar = self.calendar
|
||||||
@ -438,6 +440,8 @@ def compare_dates(f,s):
|
|||||||
return cmp(f.text,s.text)
|
return cmp(f.text,s.text)
|
||||||
if f.range == -1 or s.range == -1:
|
if f.range == -1 or s.range == -1:
|
||||||
return -1
|
return -1
|
||||||
|
if f.range != s.range:
|
||||||
|
return 1
|
||||||
|
|
||||||
first = f.get_start_date()
|
first = f.get_start_date()
|
||||||
second = s.get_start_date()
|
second = s.get_start_date()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user