use CGI qw ( -utf8 );
use Encode qw( decode is_utf8 );
use C4::Auth;
-use C4::Dates qw/format_date format_date_in_iso/;
use C4::Biblio;
use C4::Items;
use C4::Koha;
use C4::Context;
use C4::Serials;
use C4::Search qw/enabled_staff_search_views/;
+use Koha::DateUtils;
+
use List::MoreUtils qw/uniq/;
my $query = CGI->new();
my @serialdatalist;
my %processedserialid;
-my $today = C4::Dates->new();
+my $today = output_pref( dt_from_string );
foreach my $serialid (@serialids) {
#filtering serialid for duplication
$serinfo->{$d} = q{};
}
else {
- $serinfo->{$d} = format_date( $serinfo->{$d} );
+ $serinfo->{$d} = output_pref( { dt => dt_from_string( $serinfo->{$d} ), dateonly => 1 } );
}
}
- $serinfo->{arriveddate}=$today->output('syspref');
+ $serinfo->{arriveddate} = $today;
$serinfo->{'editdisable'} = (
(
$cell->{'itemid'} = 'NNEW';
$cell->{'serialid'} = 'NEW';
$cell->{'issuesatonce'} = 1;
- $cell->{arriveddate}=$today->output('syspref');
+ $cell->{arriveddate} = $today;
push @newserialloop, $cell;
push @subscriptionloop,
my ($plan_date, $pub_date);
if (defined $planneddates[$i] && $planneddates[$i] ne 'XXX') {
- $plan_date = format_date_in_iso( $planneddates[$i] );
+ $plan_date = eval { output_pref( { dt => dt_from_string( $planneddates[$i] ), dateonly => 1, dateformat => 'iso' } ); };
}
if (defined $publisheddates[$i] && $publisheddates[$i] ne 'XXX') {
- $pub_date = format_date_in_iso( $publisheddates[$i] );
+ $pub_date = eval { output_pref( { dt => dt_from_string( $publisheddates[$i] ), dateonly => 1, dateformat => 'iso' } ); };
}
if ( $serialids[$i] && $serialids[$i] eq 'NEW' ) {