2007-04-20 Don Allingham <don@gramps-project.org>
* src/GrampsDb/_ReadGedcom.py: fix calendar parsing * src/GrampsDb/_WriteGedcom.py: fix calendar generation svn: r8412
This commit is contained in:
parent
bc2ef71467
commit
c1be620f90
@ -1,3 +1,7 @@
|
||||
2007-04-20 Don Allingham <don@gramps-project.org>
|
||||
* src/GrampsDb/_ReadGedcom.py: fix calendar parsing
|
||||
* src/GrampsDb/_WriteGedcom.py: fix calendar generation
|
||||
|
||||
2007-04-20 Alex Roitman <shura@gramps-project.org>
|
||||
* src/plugins/Checkpoint.py (Checkpoint.rcs): Remove debugging
|
||||
output; Work out retrieval.
|
||||
|
@ -183,9 +183,9 @@ intRE = re.compile(r"\s*(\d+)\s*$")
|
||||
nameRegexp = re.compile(r"/?([^/]*)(/([^/]*)(/([^/]*))?)?")
|
||||
snameRegexp = re.compile(r"/([^/]*)/([^/]*)")
|
||||
modRegexp = re.compile(r"\s*(EST|CAL)\s+(.*)$")
|
||||
calRegexp = re.compile(r"\s*(ABT|BEF|AFT)?\s*@#D([^@]+)@\s*(.*)$")
|
||||
rangeRegexp = re.compile(r"\s*BET\s+@#D([^@]+)@\s*(.*)\s+AND\s+@#D([^@]+)@\s*(.*)$")
|
||||
spanRegexp = re.compile(r"\s*FROM\s+@#D([^@]+)@\s*(.*)\s+TO\s+@#D([^@]+)@\s*(.*)$")
|
||||
calRegexp = re.compile(r"\s*(ABT|BEF|AFT)?\s*@#D?([^@]+)@\s*(.*)$")
|
||||
rangeRegexp = re.compile(r"\s*BET\s+@#D?([^@]+)@\s*(.*)\s+AND\s+@#D?([^@]+)@\s*(.*)$")
|
||||
spanRegexp = re.compile(r"\s*FROM\s+@#D?([^@]+)@\s*(.*)\s+TO\s+@#D?([^@]+)@\s*(.*)$")
|
||||
intRegexp = re.compile(r"\s*INT\s+([^(]+)\((.*)\)$")
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
@ -2456,7 +2456,10 @@ class GedcomParser(UpdateCallback):
|
||||
match = calRegexp.match(text)
|
||||
if match:
|
||||
(abt,cal,data) = match.groups()
|
||||
dateobj = self.dp.parse("%s %s" % (abt, data))
|
||||
if abt:
|
||||
dateobj = self.dp.parse("%s %s" % (abt, data))
|
||||
else:
|
||||
dateobj = self.dp.parse(data)
|
||||
if cal == "FRENCH R":
|
||||
dateobj.set_calendar(RelLib.Date.CAL_FRENCH)
|
||||
elif cal == "JULIAN":
|
||||
|
@ -105,9 +105,9 @@ _month = [
|
||||
"JUL", "AUG", "SEP", "OCT", "NOV", "DEC" ]
|
||||
|
||||
_calmap = {
|
||||
RelLib.Date.CAL_HEBREW : (_hmonth, '@#HEBREW@'),
|
||||
RelLib.Date.CAL_FRENCH : (_fmonth, '@#FRENCH R@'),
|
||||
RelLib.Date.CAL_JULIAN : (_month, '@#JULIAN@'),
|
||||
RelLib.Date.CAL_HEBREW : (_hmonth, '@#DHEBREW@'),
|
||||
RelLib.Date.CAL_FRENCH : (_fmonth, '@#DFRENCH R@'),
|
||||
RelLib.Date.CAL_JULIAN : (_month, '@#DJULIAN@'),
|
||||
}
|
||||
|
||||
_caldef = {
|
||||
|
Loading…
Reference in New Issue
Block a user