Fixed parsing of alternate calendars (set calendar before setting value)

svn: r577
This commit is contained in:
Don Allingham 2001-11-22 21:21:37 +00:00
parent 9722180ef3
commit ab98e4e8cc

View File

@ -383,17 +383,22 @@ class GrampsParser:
d = self.address.getDateObj() d = self.address.getDateObj()
else: else:
d = self.event.getDateObj() d = self.event.getDateObj()
d.get_start_date().setIsoDate(attrs['start'])
d.get_stop_date().setIsoDate(attrs['stop'])
if attrs.has_key("calendar"): if attrs.has_key("calendar"):
d.set_calendar(int(attrs['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): def start_dateval(self,attrs):
if self.address: if self.address:
d = self.address.getDateObj() d = self.address.getDateObj()
else: else:
d = self.event.getDateObj() d = self.event.getDateObj()
if attrs.has_key("calendar"):
d.set_calendar(int(attrs['calendar']))
d.get_start_date().setIsoDate(attrs['val']) d.get_start_date().setIsoDate(attrs['val'])
if attrs.has_key("type"): if attrs.has_key("type"):
@ -401,8 +406,6 @@ class GrampsParser:
else: else:
d.get_start_date().getMode(None) d.get_start_date().getMode(None)
if attrs.has_key("calendar"):
d.set_calendar(int(attrs['calendar']))
def start_datestr(self,attrs): def start_datestr(self,attrs):
if self.address: if self.address: