Julian/Gregorian calendar issue when entering only year as date
when running gramps in Norwegian Fixes #10687
This commit is contained in:
parent
e5c5a210b4
commit
2490e2d07d
@ -58,6 +58,7 @@ class DateParserNb(DateParser):
|
|||||||
'innen' : Date.MOD_BEFORE,
|
'innen' : Date.MOD_BEFORE,
|
||||||
'etter' : Date.MOD_AFTER,
|
'etter' : Date.MOD_AFTER,
|
||||||
'omkring' : Date.MOD_ABOUT,
|
'omkring' : Date.MOD_ABOUT,
|
||||||
|
'omtrent' : Date.MOD_ABOUT,
|
||||||
'ca' : Date.MOD_ABOUT
|
'ca' : Date.MOD_ABOUT
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -89,8 +90,8 @@ class DateParserNb(DateParser):
|
|||||||
|
|
||||||
def init_strings(self):
|
def init_strings(self):
|
||||||
DateParser.init_strings(self)
|
DateParser.init_strings(self)
|
||||||
# match day. month year
|
self._numeric = re.compile(
|
||||||
self._numeric = re.compile(r"((\d+)[\.])?\s*((\d+))?\s*(\d+)$")
|
r"((\d+)[/\.\s]\s*)?((\d+)[/\.\-\s]\s*)?(\d+)\s*$")
|
||||||
self._span = re.compile(
|
self._span = re.compile(
|
||||||
r"(fra)?\s*(?P<start>.+)\s*(til|--|–)\s*(?P<stop>.+)",
|
r"(fra)?\s*(?P<start>.+)\s*(til|--|–)\s*(?P<stop>.+)",
|
||||||
re.IGNORECASE)
|
re.IGNORECASE)
|
||||||
@ -174,6 +175,10 @@ class DateDisplayNb(DateDisplay):
|
|||||||
return "%s%s%s%s" % (qual_str, self._mod_str[mod],
|
return "%s%s%s%s" % (qual_str, self._mod_str[mod],
|
||||||
text, scal)
|
text, scal)
|
||||||
|
|
||||||
|
def dd_dformat01(self, date_val):
|
||||||
|
""" numerical -- for Norwegian dates """
|
||||||
|
return DateDisplay.dd_dformat01(self, date_val).lstrip()
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# Register classes
|
# Register classes
|
||||||
|
Loading…
Reference in New Issue
Block a user