From: Shawn Boyette Date: Wed, 29 Apr 2009 15:51:26 +0000 (+0000) Subject: when looking for date in 260$c, non-numerics are now removed to improve quality of... X-Git-Url: http://git.equinoxoli.org/?p=migration-tools.git;a=commitdiff_plain;h=7e592e43286a01bfa2d5ad4151e95655d12ed145 when looking for date in 260$c, non-numerics are now removed to improve quality of data --- diff --git a/fingerprinter b/fingerprinter index 6e04e0b..098747d 100755 --- a/fingerprinter +++ b/fingerprinter @@ -88,11 +88,14 @@ sub populate_marc { } unless ($marc{date1} and $marc{date1} =~ /\d{4}/) { my $my_260 = $record->field('260'); - my $date1 = $my_260->subfield('c') if $my_260; - if (defined $date1 and $date1 =~ /\d{4}/) { - $marc{date1} = $date1; - $marc{fudgedate} = 1; - print XF ">> using 260c as date1 at rec $count\n"; + if ($my_260) { + my $date1 = $my_260->subfield('c'); + $date1 =~ s/\D//g; + if (defined $date1 and $date1 =~ /\d{4}/) { + $marc{date1} = $date1; + $marc{fudgedate} = 1; + print XF ">> using 260c as date1 at rec $count\n"; + } } }