Borrow on_or_after() from MFHD/Caption.pm in MFHD/Date.pm
authorDan Wells <dbw2@calvin.edu>
Mon, 16 May 2011 19:23:10 +0000 (15:23 -0400)
committerDan Wells <dbw2@calvin.edu>
Mon, 16 May 2011 19:43:35 +0000 (15:43 -0400)
Signed-off-by: Dan Wells <dbw2@calvin.edu>

Open-ILS/src/perlmods/lib/OpenILS/Utils/MFHD/Date.pm

index a41a6ac..e442347 100644 (file)
@@ -5,6 +5,7 @@ use Carp;
 
 use Data::Dumper;
 use DateTime;
+use OpenILS::Utils::MFHD::Caption;
 
 use base 'Exporter';
 
@@ -107,7 +108,7 @@ sub subsequent_day {
         # MMDD: published on the given day of the given month
         my ($mon, $day) = unpack("a2a2", $pat);
 
-        if (on_or_after($mon, $day, $cur[1], $cur[2])) {
+        if (MFHD::Caption::on_or_after([$cur[1], $cur[2]], [$mon, $day])) {
             # Current date is on or after pattern; next one is next year
             $cur[0] += 1;
         }