Lines 46-56
use MARC::Record;
Link Here
|
46 |
use Modern::Perl; |
46 |
use Modern::Perl; |
47 |
use DateTime; |
47 |
use DateTime; |
48 |
use DateTime::Format::Strptime; |
48 |
use DateTime::Format::Strptime; |
49 |
use Try::Tiny qw( catch try ); |
49 |
use Try::Tiny qw( catch try ); |
50 |
use Date::Calc qw( |
|
|
51 |
Add_Delta_Days |
52 |
Today |
53 |
); |
54 |
|
50 |
|
55 |
our $xslt_engine = Koha::XSLT::Base->new; |
51 |
our $xslt_engine = Koha::XSLT::Base->new; |
56 |
|
52 |
|
Lines 129-137
sub init {
Link Here
|
129 |
if ($days) { |
125 |
if ($days) { |
130 |
|
126 |
|
131 |
# Change this to yyyy-mm-dd |
127 |
# Change this to yyyy-mm-dd |
132 |
my ( $nowyear, $nowmonth, $nowday ) = Today(); |
128 |
my $dt_start = dt_from_string->subtract( days => $days ); |
133 |
my @date = Add_Delta_Days( $nowyear, $nowmonth, $nowday, -$days ); |
|
|
134 |
my $dt_start = dt_from_string( $date[0] . '-' . $date[1] . '-' . $date[2] ); |
135 |
$start_date = $dt_start->ymd(); |
129 |
$start_date = $dt_start->ymd(); |
136 |
$self->printlog("Harvesting from $start_date"); |
130 |
$self->printlog("Harvesting from $start_date"); |
137 |
} |
131 |
} |
138 |
- |
|
|