X-Git-Url: http://git.equinoxoli.org/?p=migration-tools.git;a=blobdiff_plain;f=fingerprinter;fp=fingerprinter;h=098747db52e3da8fb799790e1c428c3f543a928b;hp=6e04e0ba89cf4eb08983896c79f2ff01755dd0ee;hb=7e592e43286a01bfa2d5ad4151e95655d12ed145;hpb=ba632eba86106220f189e32b0b2dd94192699bf5 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"; + } } }