Module python_gedcom_2.element.event_detail
Expand source code
from python_gedcom_2.element.date import DateElement
from python_gedcom_2.element.element import Element
class EventDetail(Element):
"""
An EventDetail can be one of many kinds of actual Element. This is an abstract class to contain a lot of shared methods.
(See page 29 of the GEDCOM 5.5 spec for details)
NOTE: This is different from an event element, which is a legitimate GEDCOM tag and has its own rules.
"""
def get_year_in_date(self):
date = -1
for child in self.get_child_elements():
if isinstance(child, DateElement):
date = child.get_year()
return date
Classes
class EventDetail (level, pointer, tag, value, crlf='\n', multi_line=True)
-
An EventDetail can be one of many kinds of actual Element. This is an abstract class to contain a lot of shared methods. (See page 29 of the GEDCOM 5.5 spec for details) NOTE: This is different from an event element, which is a legitimate GEDCOM tag and has its own rules.
Expand source code
class EventDetail(Element): """ An EventDetail can be one of many kinds of actual Element. This is an abstract class to contain a lot of shared methods. (See page 29 of the GEDCOM 5.5 spec for details) NOTE: This is different from an event element, which is a legitimate GEDCOM tag and has its own rules. """ def get_year_in_date(self): date = -1 for child in self.get_child_elements(): if isinstance(child, DateElement): date = child.get_year() return date
Ancestors
Subclasses
- AdoptionElement
- AdultChristeningElement
- AnnulmentElement
- BaptismElement
- BarMitzvahElement
- BasMitzvahElement
- BirthElement
- BlessingElement
- BurialElement
- CasteElement
- CensusElement
- ChildrenCountElement
- ChristeningElement
- ConfirmationElement
- CremationElement
- DeathElement
- DivorceElement
- DivorceFiledElement
- EducationElement
- EmigrationElement
- EngagementElement
- EventElement
- FirstCommunionElement
- GraduationElement
- IdentificationNumberElement
- ImmigrationElement
- MarriageElement
- MarriageBannElement
- MarriageContractElement
- MarriageCountElement
- MarriageLicenseElement
- MarriageSettlementElement
- NationalityElement
- NaturalizationElement
- OccupationElement
- OrdinanceElement
- OrdinationElement
- PhysicalDescriptionElement
- ProbateElement
- PropertyElement
- ReligionElement
- ResidenceElement
- RetirementElement
- SocialSecurityNumberElement
- TitleElement
- WillElement
Methods
def get_year_in_date(self)
-
Expand source code
def get_year_in_date(self): date = -1 for child in self.get_child_elements(): if isinstance(child, DateElement): date = child.get_year() return date
Inherited members