Skip to content

Commit

Permalink
Added first cousin four-times-removed
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelhorne committed Aug 2, 2024
1 parent 6129cb9 commit 5f15c17
Showing 1 changed file with 18 additions and 15 deletions.
33 changes: 18 additions & 15 deletions ged2site
Original file line number Diff line number Diff line change
Expand Up @@ -2843,7 +2843,7 @@ sub print_person
if($opts{'w'} && $numberofchildren) {
foreach my $child(@children) {
if($child->xref() eq $person->xref()) {
complain({ person => $person, warning => 'person is own parent' });
complain({ person => $person, warning => 'Person is own parent' });
# Avoid loops in G::I::Relationship
return;
}
Expand All @@ -2858,17 +2858,14 @@ sub print_person
if($numberofchildren >= 2) {
if((my $first = dateofbirth(person => $children[0])) &&
(my $second = dateofbirth(person => $children[1]))) {
if($first =~ /.*?(\d{3,4})$/) {
$first = $1;
if($second =~ /.*?(\d{3,4})$/) {
$second = $1;
my $gap = abs($first - $second);
if($gap >= 40) {
complain({
person => $person,
warning => "Large age gap ($gap years) between the two children"
});
}
if($first = get_year_from_date($first) &&
($second = get_year_from_date($second))) {
my $gap = abs($first - $second);
if($gap >= 40) {
complain({
person => $person,
warning => "Large age gap ($gap years) between the two children"
});
}
}
}
Expand All @@ -2887,10 +2884,10 @@ sub print_person
foreach my $sibling(@siblings) {
if(($sibling->name() eq $person->name()) || Text::Names::samePerson($sibling->name(), $person->name())) {
my $siblingbirth = dateofbirth($sibling);
if($siblingbirth && ($siblingbirth eq $dateofbirth)) {
complain({ person => $sibling, warning => 'possible duplicate person' });
if($siblingbirth && (datecmp($siblingbirth, $dateofbirth) == 0)) {
complain({ person => $sibling, warning => 'Possible duplicate person' });
} elsif((!$dateofdeath) && !dateofdeath($sibling)) {
complain({ person => $sibling, warning => 'two siblings of the same name alive at the same time'});
complain({ person => $sibling, warning => 'Two siblings of the same name alive at the same time'});
}
}
}
Expand Down Expand Up @@ -10100,6 +10097,7 @@ sub Gedcom::Individual::relationship_up
2 << 24 | 3 => 'first cousin once-removed',
2 << 24 | 4 => 'first cousin twice-removed',
2 << 24 | 5 => 'first cousin three-times-removed',
2 << 24 | 6 => 'first cousin four-times-removed',
3 << 24 | 1 => 'great-uncle',
3 << 24 | 2 => 'first cousin once-removed',
3 << 24 | 3 => 'second cousin',
Expand Down Expand Up @@ -10176,6 +10174,7 @@ sub Gedcom::Individual::relationship_up
2 << 24 | 3 => 'first cousin once-removed',
2 << 24 | 4 => 'first cousin twice-removed',
2 << 24 | 5 => 'first cousin three-times-removed',
2 << 24 | 6 => 'first cousin four-times-removed',
3 << 24 | 1 => 'great-uncle',
3 << 24 | 2 => 'first cousin once-removed',
3 << 24 | 3 => 'cousin issu de germain',
Expand Down Expand Up @@ -10251,6 +10250,7 @@ sub Gedcom::Individual::relationship_up
2 << 24 | 3 => 'first cousin once-removed',
2 << 24 | 4 => 'first cousin twice-removed',
2 << 24 | 5 => 'first cousin three-times-removed',
2 << 24 | 6 => 'first cousin four-times-removed',
3 << 24 | 1 => 'great-uncle',
3 << 24 | 2 => 'first cousin once-removed',
3 << 24 | 3 => 'second cousin',
Expand Down Expand Up @@ -10326,6 +10326,7 @@ sub Gedcom::Individual::relationship_up
2 << 24 | 3 => 'first cousin once-removed',
2 << 24 | 4 => 'first cousin twice-removed',
2 << 24 | 5 => 'first cousin three-times-removed',
2 << 24 | 6 => 'first cousin four-times-removed',
3 << 24 | 1 => 'great-aunt',
3 << 24 | 2 => 'first cousin once-removed',
3 << 24 | 3 => 'second cousin',
Expand Down Expand Up @@ -10401,6 +10402,7 @@ sub Gedcom::Individual::relationship_up
2 << 24 | 3 => 'first cousin once-removed',
2 << 24 | 4 => 'first cousin twice-removed',
2 << 24 | 5 => 'first cousin three-times-removed',
2 << 24 | 6 => 'first cousin four-times-removed',
3 << 24 | 1 => 'great-aunt',
3 << 24 | 2 => 'first cousin once-removed',
3 << 24 | 3 => 'cousine issue de germain',
Expand Down Expand Up @@ -10476,6 +10478,7 @@ sub Gedcom::Individual::relationship_up
2 << 24 | 3 => 'first cousin once-removed',
2 << 24 | 4 => 'first cousin twice-removed',
2 << 24 | 5 => 'first cousin three-times-removed',
2 << 24 | 6 => 'first cousin four-times-removed',
3 << 24 | 1 => 'great-aunt',
3 << 24 | 2 => 'first cousin once-removed',
3 << 24 | 3 => 'second cousin',
Expand Down

0 comments on commit 5f15c17

Please sign in to comment.