Bug 24674: Uncertain years for publicationyear/copyrightdate -- corrected
authorJanusz Kaczmarek <januszop@gmail.com>
Mon, 17 Feb 2020 11:58:46 +0000 (12:58 +0100)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 5 Nov 2021 11:17:08 +0000 (12:17 +0100)
This is a correction to Bug 11046: YYY-, YY--, Y---, are also
correct according to ISBD: uncertain year, but certain decade/century
(cf. n. 4.3.8 in ISBD Consolidated Edition of 2011).
(Question mark is not mandatory.)

In addition, in Poland a form with one only dash is quite common,
like YY- (== YY--).

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
See last follow-up.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
C4/Biblio.pm

index 863ce49..e386346 100644 (file)
@@ -2503,9 +2503,9 @@ sub _adjust_pubyear {
              (?<year>\d)[-]?[.Xx?]{3}
             |(?<year>\d{2})[.Xx?]{2}
             |(?<year>\d{3})[.Xx?]
-            |(?<year>\d)[-]{3}\?
-            |(?<year>\d\d)[-]{2}\?
-            |(?<year>\d{3})[-]\?
+            |(?<year>\d)[-]{1,3}\??
+            |(?<year>\d\d)[-]{1,2}\??
+            |(?<year>\d{3})[-]\??
     /xms ) { # the form 198-? occurred in Dutch ISBD rules
         my $digits = $+{year};
         $retval = $digits * ( 10 ** ( 4 - length($digits) ));