[Koha-bugs] [Bug 10377] fix_unimarc_100 could be improved with 210$d values

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed May 29 21:24:19 CEST 2013


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10377

--- Comment #3 from Janusz Kaczmarek <januszop at gmail.com> ---
How about something in this style:

my $string = marc->subfield('100','a');
my $s100a08 = substr($string, 8, 1);
my $s100a09_12 = substr($string, 9, 4);
my $year_now = POSIX::strftime("%Y", localtime());
if ($s100a08 =~ /[abcdefghijku]/ && 
    $s100a09_12 =~ /\d{4}/ && 
    $s100a09_12 >= 1455 && 
    $s100a09_12 <= $year_now + 1) {  # +1 just in case the is a next year date
on the document
    # keep the date as $s100a08 . $s100a09_12
} else {
    # don't care about pub date from 100 -- it does not make sense, try to
reconstruct it from 210$d
}

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list