diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index a4ea83f56..48bd01169 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,3 +1,6 @@ +2005-10-04 Don Allingham + * src/DateParser.py: handle non-matching dates as strings properly + 2005-10-04 Stefan Bjork * src/dates/Date_sv.py: Fixes. No differences from english version on test data. diff --git a/gramps2/src/DateParser.py b/gramps2/src/DateParser.py index 05703d7c7..2502807bb 100644 --- a/gramps2/src/DateParser.py +++ b/gramps2/src/DateParser.py @@ -550,6 +550,7 @@ class DateParser: (text,cal) = self.match_calendar(text,cal) (text,qual) = self.match_quality(text,qual) + if self.match_span(text,cal,qual,date): return if self.match_range(text,cal,qual,date): @@ -559,9 +560,11 @@ class DateParser: if self.match_modifier(text,cal,qual,bc,date): return - try: subdate = self._parse_subdate(text,self.parser[cal]) + if subdate == Date.EMPTY and text != "": + date.set_as_text(text) + return except: date.set_as_text(text) return