toString(); // lists requires a unique ID in case there are multiple lists per page $today_jd = Carbon::now()->julianDay(); $hundred_years_ago = Carbon::now()->subYears(100)->julianDay(); /** * @var Tree $tree * @var Collection $families */ ?> getPreference('MAX_ALIVE_AGE'); // init chart data $marr_by_age = []; for ($age = 0; $age <= $max_age; $age++) { $marr_by_age[$age]['M'] = 0; $marr_by_age[$age]['F'] = 0; $marr_by_age[$age]['U'] = 0; } $birt_by_decade = []; $marr_by_decade = []; for ($year = 1400; $year < 2050; $year += 10) { $birt_by_decade[$year]['M'] = 0; $birt_by_decade[$year]['F'] = 0; $birt_by_decade[$year]['U'] = 0; $marr_by_decade[$year]['M'] = 0; $marr_by_decade[$year]['F'] = 0; $marr_by_decade[$year]['U'] = 0; } $birthData = [ [ [ 'label' => I18N::translate('Century'), 'type' => 'date', ], [ 'label' => I18N::translate('Males'), 'type' => 'number', ], [ 'label' => I18N::translate('Females'), 'type' => 'number', ], ] ]; $marriageData = [ [ [ 'label' => I18N::translate('Century'), 'type' => 'date', ], [ 'label' => I18N::translate('Males'), 'type' => 'number', ], [ 'label' => I18N::translate('Females'), 'type' => 'number', ], ] ]; $marriageAgeData = [ [ I18N::translate('Age'), I18N::translate('Males'), I18N::translate('Females'), I18N::translate('Average age'), ] ]; ?>
> husband() ?? new Individual('H', '0 @H@ INDI', null, $family->tree()) ?> wife() ?? new Individual('W', '0 @W@ INDI', null, $family->tree()) ?> getMarriageDate(); $hdate = $husb->getBirthDate(); if ($hdate->isOK() && $mdate->isOK()) { $gregorian_year = $hdate->gregorianYear(); if ($gregorian_year >= 1550 && $gregorian_year < 2030) { ++$birt_by_decade[(int) ($gregorian_year / 10) * 10][$husb->sex()]; } $husband_age = new Age($hdate, $mdate); $husband_age_sort = $husband_age->agedays(); $husband_age_years = $husband_age->ageYears(); $husband_age_display = I18N::number($husband_age_years); if ($husband_age_years >= 0 && $husband_age_years <= $max_age) { ++$marr_by_age[$husband_age_years][$husb->sex()]; } } else { $husband_age_sort = 0; $husband_age_display = ''; } ?> getBirthDate(); if ($wdate->isOK() && $mdate->isOK()) { $gregorian_year = $wdate->gregorianYear(); if ($gregorian_year >= 1550 && $gregorian_year < 2030) { ++$birt_by_decade[(int) ($gregorian_year / 10) * 10][$husb->sex()]; } $wife_age = new Age($wdate, $mdate); $wife_age_sort = $wife_age->ageDays(); $wife_age_years = $wife_age->ageYears(); $wife_age_display = I18N::number($wife_age_years); if ($wife_age_years >= 0 && $wife_age_years <= $max_age) { ++$marr_by_age[$wife_age_years][$husb->sex()]; } } else { $wife_age_sort = 0; $wife_age_display = ''; } ?> getMarriageDate(); if ($marriage_date->isOK()) { $marriage_anniversary = new Age($marriage_date, new Date(strtoupper(date('d M Y')))); $marriage_anniversary_sort = $marriage_anniversary->ageDays(); $marriage_anniversary_display = I18N::number($marriage_anniversary->ageYears()); } else { $marriage_anniversary_sort = 0; $marriage_anniversary_display = ''; } ?>
getAllNames() as $num => $name) : ?> getPrimaryName()) : ?> getPrimaryName()) : ?> $husb->sex()]) ?>
$husb]) ?>
getAllNames() as $num => $name) : ?> getPrimaryName()) : ?> getPrimaryName()) : ?> $wife->sex()]) ?>
$wife]) ?>
getAllMarriageDates()) : ?> $marriage_date) : ?>
display(true) ?>
gregorianYear() >= 1550 && $marriage_dates[0]->gregorianYear() < 2030) : ?> gregorianYear() / 10) * 10][$husb->sex()]; ++$marr_by_decade[(int) ($marriage_dates[0]->gregorianYear() / 10) * 10][$wife->sex()]; ?> facts(['_NMR'])->isNotEmpty()) : ?> facts(['MARR'])->isNotEmpty()) : ?>
getAllMarriagePlaces() as $n => $marriage_place) : ?> shortName(true) ?>
numberOfChildren()) ?> $family->lastChangeTimestamp()]) ?>