Lines 52-57
$verbose and print "================================\n";
Link Here
|
52 |
$date_created_marc = '099c' unless $date_created_marc; |
52 |
$date_created_marc = '099c' unless $date_created_marc; |
53 |
my ( $c_field, $c_subfield ) = _read_marc_code($date_created_marc); |
53 |
my ( $c_field, $c_subfield ) = _read_marc_code($date_created_marc); |
54 |
die "date-created-marc '$date_created_marc' is not correct." unless $c_field; |
54 |
die "date-created-marc '$date_created_marc' is not correct." unless $c_field; |
|
|
55 |
die "date-created-marc field is greated that 009, it should have a subfield." |
56 |
if ( $c_field > 9 && !defined $c_subfield ); |
57 |
die "date-created-marc field is lower that 010, it should not have a subfield." |
58 |
if ( $c_field < 10 && defined $c_subfield ); |
55 |
if ($verbose) { |
59 |
if ($verbose) { |
56 |
print "Date created on $c_field"; |
60 |
print "Date created on $c_field"; |
57 |
print $c_subfield if defined $c_subfield; # use of defined to allow 0 |
61 |
print $c_subfield if defined $c_subfield; # use of defined to allow 0 |
Lines 62-67
if ($verbose) {
Link Here
|
62 |
$date_modified_marc = '099d' unless $date_modified_marc; |
66 |
$date_modified_marc = '099d' unless $date_modified_marc; |
63 |
my ( $m_field, $m_subfield ) = _read_marc_code($date_modified_marc); |
67 |
my ( $m_field, $m_subfield ) = _read_marc_code($date_modified_marc); |
64 |
die "date-modified-marc '$date_modified_marc' is not correct." unless $m_field; |
68 |
die "date-modified-marc '$date_modified_marc' is not correct." unless $m_field; |
|
|
69 |
die "date-modified-marc field is greated that 009, it should have a subfield." |
70 |
if ( $m_field > 9 && !defined $m_subfield ); |
71 |
die "date-modified-marc field is lower that 010, it should not have a subfield." |
72 |
if ( $m_field < 10 && defined $m_subfield ); |
65 |
die |
73 |
die |
66 |
"When date-created-marc and date-modified-marc are on same field, they should have distinct subfields" |
74 |
"When date-created-marc and date-modified-marc are on same field, they should have distinct subfields" |
67 |
if ( $c_field eq $m_field ) |
75 |
if ( $c_field eq $m_field ) |
68 |
- |
|
|