function get_lds_glance(WT_Individual $indi) { $BAPL = $indi->getFacts('BAPL') ? 'B' : '_'; $ENDL = $indi->getFacts('ENDL') ? 'E' : '_'; $SLGC = $indi->getFacts('SLGC') ? 'C' : '_'; $SLGS = '_'; foreach ($indi->getSpouseFamilies() as $family) { if ($family->getFacts('SLGS')) { $SLGS = ''; } } return $BAPL . $ENDL . $SLGS . $SLGC; }
private static function spouse_facts(WT_Individual $person, WT_Individual $spouse) { global $controller, $SHOW_RELATIVES_EVENTS; $facts = array(); if (strstr($SHOW_RELATIVES_EVENTS, '_DEAT_SPOU')) { // Only include events between birth and death $birt_date = $controller->record->getEstimatedBirthDate(); $deat_date = $controller->record->getEstimatedDeathDate(); foreach ($spouse->getFacts(WT_EVENTS_DEAT) as $fact) { $fact_date = $fact->getDate(); if ($fact_date->isOK() && WT_Date::Compare($birt_date, $fact_date) <= 0 && WT_Date::Compare($fact_date, $deat_date) <= 0) { // Convert the event to a close relatives event. $rela_fact = clone $fact; $rela_fact->setTag('_' . $fact->getTag() . '_SPOU'); $facts[] = $rela_fact; } } } return $facts; }