* src/DateHandler/_DateParser.py (DateParser.init_strings): fix date parsing to allow

for spaces in numerical format. #892


svn: r8037
This commit is contained in:
Don Allingham 2007-02-03 18:30:43 +00:00
parent f96e1bf992
commit 58d12df51a
2 changed files with 3 additions and 1 deletions

View File

@ -1,4 +1,6 @@
2007-02-03 Don Allingham <don@gramps-project.org> 2007-02-03 Don Allingham <don@gramps-project.org>
* 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 * src/Editors/_EditFamily.py (EditFamily.check_for_family_change): fix
warning message. warning message.

View File

@ -281,7 +281,7 @@ class DateParser:
re.IGNORECASE) re.IGNORECASE)
self._itext2 = re.compile('(\d+)?\s+?%s\s*((\d+)(/\d+)?)?\s*$' % self._imon_str, self._itext2 = re.compile('(\d+)?\s+?%s\s*((\d+)(/\d+)?)?\s*$' % self._imon_str,
re.IGNORECASE) 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._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 = 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)) % (self._rfc_day_str,self._rfc_mon_str))