* src/DateParser.py: handle non-matching dates as strings properly
svn: r5269
This commit is contained in:
parent
2b60db6940
commit
278b7751ba
@ -1,3 +1,6 @@
|
|||||||
|
2005-10-04 Don Allingham <don@gramps-project.org>
|
||||||
|
* src/DateParser.py: handle non-matching dates as strings properly
|
||||||
|
|
||||||
2005-10-04 Stefan Bjork <skalman@acc.umu.se>
|
2005-10-04 Stefan Bjork <skalman@acc.umu.se>
|
||||||
* src/dates/Date_sv.py: Fixes. No differences from english version
|
* src/dates/Date_sv.py: Fixes. No differences from english version
|
||||||
on test data.
|
on test data.
|
||||||
|
@ -550,6 +550,7 @@ class DateParser:
|
|||||||
|
|
||||||
(text,cal) = self.match_calendar(text,cal)
|
(text,cal) = self.match_calendar(text,cal)
|
||||||
(text,qual) = self.match_quality(text,qual)
|
(text,qual) = self.match_quality(text,qual)
|
||||||
|
|
||||||
if self.match_span(text,cal,qual,date):
|
if self.match_span(text,cal,qual,date):
|
||||||
return
|
return
|
||||||
if self.match_range(text,cal,qual,date):
|
if self.match_range(text,cal,qual,date):
|
||||||
@ -559,9 +560,11 @@ class DateParser:
|
|||||||
if self.match_modifier(text,cal,qual,bc,date):
|
if self.match_modifier(text,cal,qual,bc,date):
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
subdate = self._parse_subdate(text,self.parser[cal])
|
subdate = self._parse_subdate(text,self.parser[cal])
|
||||||
|
if subdate == Date.EMPTY and text != "":
|
||||||
|
date.set_as_text(text)
|
||||||
|
return
|
||||||
except:
|
except:
|
||||||
date.set_as_text(text)
|
date.set_as_text(text)
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user