From 2e32fc71417040df6f594d8833eab0bc7cf81e7e Mon Sep 17 00:00:00 2001 From: Paul Franklin Date: Thu, 9 Jul 2015 23:20:29 -0700 Subject: [PATCH] 4089: fix Lithuanian date parser (another y-m-d one) --- gramps/gen/datehandler/_date_lt.py | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/gramps/gen/datehandler/_date_lt.py b/gramps/gen/datehandler/_date_lt.py index a21e3486f..4dad8b644 100644 --- a/gramps/gen/datehandler/_date_lt.py +++ b/gramps/gen/datehandler/_date_lt.py @@ -130,6 +130,8 @@ class DateParserLT(DateParser): def init_strings(self): DateParser.init_strings(self) + self._text2 = re.compile('((\d+)(/\d+)?)?\s+?m\.\s+%s\s*(\d+)?\s*d?\.?$' + % self._mon_str, re.IGNORECASE) _span_1 = ['nuo'] _span_2 = ['iki'] _range_1 = ['tarp'] @@ -141,27 +143,6 @@ class DateParserLT(DateParser): ('|'.join(_range_1), '|'.join(_range_2)), re.IGNORECASE) -#------------------------------------------------------------------------ -# -# FIXME: oficial long date format (ex, 2011 m. vasario 4 d.) -# is not recognized correctly: -# with self._text2 - day is recognized as year, year - as day -# with self._iso - month not recognized, day recognized, -# year increased by 1, date treated as double -# TODO: in _DateParser.py in _parse_calendar modify groups -# -#------------------------------------------------------------------------ -# -# # gregorian and julian -# -# self._text2 = re.compile('(\d+)?\s*?m\.?\s*?%s\.?\s*((\d+)(/\d+)?)?\s*?d?\.?' % -# self._mon_str, re.IGNORECASE) -# -# self._iso = re.compile('(\d+)(/\d+)?\s*?m?\.?\s+?%s\.?\s*((\d+))?\s*?d?\.?' % -# self._mon_str, re.IGNORECASE) -# -#------------------------------------------------------------------------- - #------------------------------------------------------------------------- # # Lithuanian displayer