From 5095c0636c7a014a0a703d7930e6619de3e56901 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Thu, 22 Nov 2001 21:21:37 +0000 Subject: [PATCH] Fixed parsing of alternate calendars (set calendar before setting value) svn: r577 --- src/GrampsParser.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/GrampsParser.py b/src/GrampsParser.py index faaeb56c1..17fb3ad8d 100644 --- a/src/GrampsParser.py +++ b/src/GrampsParser.py @@ -383,10 +383,12 @@ class GrampsParser: d = self.address.getDateObj() else: d = self.event.getDateObj() - d.get_start_date().setIsoDate(attrs['start']) - d.get_stop_date().setIsoDate(attrs['stop']) + if attrs.has_key("calendar"): d.set_calendar(int(attrs['calendar'])) + + d.get_start_date().setIsoDate(attrs['start']) + d.get_stop_date().setIsoDate(attrs['stop']) def start_dateval(self,attrs): if self.address: @@ -394,6 +396,9 @@ class GrampsParser: else: d = self.event.getDateObj() + if attrs.has_key("calendar"): + d.set_calendar(int(attrs['calendar'])) + d.get_start_date().setIsoDate(attrs['val']) if attrs.has_key("type"): @@ -401,8 +406,6 @@ class GrampsParser: else: d.get_start_date().getMode(None) - if attrs.has_key("calendar"): - d.set_calendar(int(attrs['calendar'])) def start_datestr(self,attrs): if self.address: