polish date handler for french locales
This commit is contained in:
parent
20ca667b61
commit
c2ee4b0ab9
@ -182,10 +182,10 @@ class DateParserFR(DateParser):
|
||||
# This self._numeric is different from the base
|
||||
# avoid bug gregorian / french calendar conversion (+/-10 days)
|
||||
|
||||
self._numeric = re.compile("((\d+)[/\. ])?\s*((\d+)[/\.])?\s*(\d+)\s*$")
|
||||
self._span = re.compile("(de)\s+(?P<start>.+)\s+(à)\s+(?P<stop>.+)",
|
||||
self._numeric = re.compile(r"((\d+)[/\. ])?\s*((\d+)[/\.])?\s*(\d+)\s*$")
|
||||
self._span = re.compile(r"(de)\s+(?P<start>.+)\s+(à)\s+(?P<stop>.+)",
|
||||
re.IGNORECASE)
|
||||
self._range = re.compile("(entre|ent\.|ent)\s+(?P<start>.+)\s+(et)\s+(?P<stop>.+)",
|
||||
self._range = re.compile(r"(entre|ent\.|ent)\s+(?P<start>.+)\s+(et)\s+(?P<stop>.+)",
|
||||
re.IGNORECASE)
|
||||
|
||||
# This self._text are different from the base
|
||||
@ -193,32 +193,32 @@ class DateParserFR(DateParser):
|
||||
|
||||
#gregorian and julian
|
||||
|
||||
self._text2 = re.compile('(\d+)?.?\s+?%s\s*((\d+)(/\d+)?)?' %
|
||||
self._text2 = re.compile(r'(\d+)?.?\s+?%s\s*((\d+)(/\d+)?)?' %
|
||||
self._mon_str, re.IGNORECASE)
|
||||
|
||||
#hebrew
|
||||
|
||||
self._jtext2 = re.compile('(\d+)?.?\s+?%s\s*((\d+)(/\d+)?)?' %
|
||||
self._jtext2 = re.compile(r'(\d+)?.?\s+?%s\s*((\d+)(/\d+)?)?' %
|
||||
self._jmon_str, re.IGNORECASE)
|
||||
|
||||
#french
|
||||
|
||||
self._ftext2 = re.compile('(\d+)?.?\s+?%s\s*((\d+)(/\d+)?)?' %
|
||||
self._ftext2 = re.compile(r'(\d+)?.?\s+?%s\s*((\d+)(/\d+)?)?' %
|
||||
self._fmon_str, re.IGNORECASE)
|
||||
|
||||
#persian
|
||||
|
||||
self._ptext2 = re.compile('(\d+)?.?\s+?%s\s*((\d+)(/\d+)?)?' %
|
||||
self._ptext2 = re.compile(r'(\d+)?.?\s+?%s\s*((\d+)(/\d+)?)?' %
|
||||
self._pmon_str, re.IGNORECASE)
|
||||
|
||||
#islamic
|
||||
|
||||
self._itext2 = re.compile('(\d+)?.?\s+?%s\s*((\d+)(/\d+)?)?' %
|
||||
self._itext2 = re.compile(r'(\d+)?.?\s+?%s\s*((\d+)(/\d+)?)?' %
|
||||
self._imon_str, re.IGNORECASE)
|
||||
|
||||
#swedish
|
||||
|
||||
self._stext2 = re.compile('(\d+)?.?\s+?%s\s*((\d+)(/\d+)?)?' %
|
||||
self._stext2 = re.compile(r'(\d+)?.?\s+?%s\s*((\d+)(/\d+)?)?' %
|
||||
self._smon_str, re.IGNORECASE)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
@ -247,8 +247,8 @@ class DateDisplayFR(DateDisplay):
|
||||
"Jour. Mois Année", # 4
|
||||
"Jour. MOI Année", # 5
|
||||
"Mois Jour, Année", # 6
|
||||
"MOI Jour, Année", # 7
|
||||
)
|
||||
"MOI Jour, Année",) # 7
|
||||
|
||||
# this definition must agree with its "_display_gregorian" method
|
||||
|
||||
def _display_gregorian(self, date_val, **kwargs):
|
||||
|
Loading…
Reference in New Issue
Block a user