From 0936aa37e8e00fdec8329e2da68cb20daebe1e68 Mon Sep 17 00:00:00 2001 From: Vassilii Khachaturov Date: Fri, 20 Sep 2013 12:41:33 +0000 Subject: [PATCH] =?UTF-8?q?DateParserRU:=20suport=20'=D0=B4=D0=BE'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add 'до' both as a Date.MOD_BEFORE modifier token and as a span2 token (i.e., stop end for a Date.MOD_SPAN). svn: r23174 --- gramps/gen/datehandler/_date_ru.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gramps/gen/datehandler/_date_ru.py b/gramps/gen/datehandler/_date_ru.py index 5bb039b36..529216106 100644 --- a/gramps/gen/datehandler/_date_ru.py +++ b/gramps/gen/datehandler/_date_ru.py @@ -52,6 +52,7 @@ class DateParserRU(DateParser): modifier_to_int = { 'перед' : Date.MOD_BEFORE, 'по' : Date.MOD_BEFORE, + 'до' : Date.MOD_BEFORE, 'после' : Date.MOD_AFTER, 'п.' : Date.MOD_AFTER, 'п' : Date.MOD_AFTER, @@ -219,7 +220,7 @@ class DateParserRU(DateParser): def init_strings(self): DateParser.init_strings(self) _span_1 = ['с', 'от'] - _span_2 = ['по'] + _span_2 = ['по', 'до'] _range_1 = ['между', 'меж\.', 'меж'] _range_2 = ['и'] self._span = re.compile("(%s)\s+(?P.+)\s+(%s)\s+(?P.+)" %