From 1938c91ae8b66b81ce5e2f00137bfad8e747dfa9 Mon Sep 17 00:00:00 2001 From: Nigel Horne Date: Mon, 13 Nov 2023 15:12:45 -0500 Subject: [PATCH] Fix false positives on date ranges --- gedcom | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gedcom b/gedcom index 55b3d8e..08d78b3 100755 --- a/gedcom +++ b/gedcom @@ -4472,8 +4472,12 @@ sub print_person print __LINE__, ": count = $count\n" if($opts{'v'}); if(defined($rdate) && ($rdate =~ /^\s*(.+\d\d)\s*\-\s*(.+\d\d)\s*$/)) { - complain({ person => $person, warning => "Changing date '$rdate' to 'bet $1 and $2'" }); - $rdate = "bet $1 and $2"; + my $start = $1; + my $end = $2; + if($end !~ /^\d\d\-\d\d$/) { + complain({ person => $person, warning => "Changing date '$rdate' to 'bet $start and $end'" }); + $rdate = "bet $start and $end"; + } } if(($count == 0) || !places_are_the_same({ person => $person, first => $residence, second => $residencelist[$count - 1] })) {