Permalink
Browse files

[Fixes #15351769] regex was failing to match November for hold resume…

…date
  • Loading branch information...
1 parent fe91b4b commit bc6f42e8daa1b2a655e31a44232e434d8136f8df @hgq hgq committed Jul 5, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 opac/opac-modrequest.pl
View
@@ -58,7 +58,7 @@
$resumedate = $parts[2] . '-' . $parts[0] . '-' . $parts[1];
}
- if ( $resumedate =~ m/(\d{4})-(0[13578]|1[02])-(0[1-9]|[12]\d|3[01])|(\d{4})-(0[469]|11])-(0[1-9]|[12]\d|30)|(\d{4})-(02)-(0[1-9]|1\d|2[0-9])/ ) {
+ if ( $resumedate =~ m/^([0-9]{4})(?:(1[0-2]|0[1-9])|-?(1[0-2]|0[1-9])-?)(3[0-1]|0[1-9]|[1-2][0-9])$/ ) {
SuspendReserve( $reservenumber[$i], $resumedate );
} else {
SuspendReserve( $reservenumber[$i] );

0 comments on commit bc6f42e

Please sign in to comment.