4345: custom TIME on eventdate

svn: r16178
This commit is contained in:
Jérôme Rapinat
2010-11-11 14:55:36 +00:00
parent 08e91b98cf
commit b43e13d6c4
2 changed files with 16 additions and 1 deletions

View File

@@ -1919,7 +1919,8 @@ class GedcomParser(UpdateCallback):
TOKEN__WITN : self.__event_witness,
TOKEN__WTN : self.__event_witness,
TOKEN_RELI : self.__ignore,
TOKEN_TIME : self.__ignore,
TOKEN_TIME : self.__ignore,
TOKEN__TIME : self.__event_time,
TOKEN_ASSO : self.__ignore,
TOKEN_IGNORE : self.__ignore,
TOKEN_STAT : self.__ignore,
@@ -4526,6 +4527,18 @@ class GedcomParser(UpdateCallback):
attr.set_value(line.data)
state.event.add_attribute(attr)
def __event_time(self, line, state):
"""
@param line: The current line in GedLine format
@type line: GedLine
@param state: The current state
@type state: CurrentState
"""
attr = gen.lib.Attribute()
attr.set_type(gen.lib.AttributeType.TIME)
attr.set_value(line.data)
state.event.add_attribute(attr)
def __event_witness(self, line, state):
"""
Parse the witness of an event