From 58d12df51ae8d2f9f51f6071becfd954091e59f2 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Sat, 3 Feb 2007 18:30:43 +0000 Subject: [PATCH] * src/DateHandler/_DateParser.py (DateParser.init_strings): fix date parsing to allow for spaces in numerical format. #892 svn: r8037 --- gramps2/ChangeLog | 2 ++ gramps2/src/DateHandler/_DateParser.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 7cdb2adde..f1b4140ca 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,4 +1,6 @@ 2007-02-03 Don Allingham + * src/DateHandler/_DateParser.py (DateParser.init_strings): fix date parsing to allow + for spaces in numerical format. #892 * src/Editors/_EditFamily.py (EditFamily.check_for_family_change): fix warning message. diff --git a/gramps2/src/DateHandler/_DateParser.py b/gramps2/src/DateHandler/_DateParser.py index 129244c16..2d3c41bac 100644 --- a/gramps2/src/DateHandler/_DateParser.py +++ b/gramps2/src/DateHandler/_DateParser.py @@ -281,7 +281,7 @@ class DateParser: re.IGNORECASE) self._itext2 = re.compile('(\d+)?\s+?%s\s*((\d+)(/\d+)?)?\s*$' % self._imon_str, re.IGNORECASE) - self._numeric = re.compile("((\d+)[/\.])?((\d+)[/\.])?(\d+)\s*$") + self._numeric = re.compile("((\d+)[/\.]\s*)?((\d+)[/\.]\s*)?(\d+)\s*$") self._iso = re.compile("(\d+)(/(\d+))?-(\d+)-(\d+)\s*$") self._rfc = re.compile("(%s,)?\s+(\d|\d\d)\s+%s\s+(\d+)\s+\d\d:\d\d(:\d\d)?\s+(\+|-)\d\d\d\d" % (self._rfc_day_str,self._rfc_mon_str))