}
if ($datelastseen) {
- $datelastseen = format_date_in_iso($datelastseen);
+ $datelastseen = output_pref({ str => $datelastseen, dateformat => 'iso', dateonly => 1 });
push @where_strings, '(datelastseen < ? OR datelastseen IS NULL)';
push @bind_params, $datelastseen;
}
while (my $data = $sth->fetchrow_hashref){
$data->{hilighted} = ($hilighted>0);
$data->{info} =~ s/\n/<br\/>/g;
- $data->{day} = format_date($data->{timestamp});
+ $data->{day} = output_pref({ str => $data->{timestamp} });
push @results, $data;
$count++;
$hilighted = -$hilighted;
'subscription'.
$pattern is a hashref containing all the attributes of the table
'subscription_numberpatterns'.
-$planneddate is a C4::Dates object.
+$planneddate is a date sting in iso format.
This function get the next issue for the subscription given on input arg
=cut
use C4::Output;
use CGI qw ( -utf8 );
use C4::Acquisition qw( SearchOrders );
-use C4::Dates qw/format_date/;
+use Koha::DateUtils;
use Koha::Acquisition::Bookseller;
basketno => $ord->{'basketno'},
total => $ord->{'count(*)'},
authorisedby => $ord->{'authorisedby'},
- creationdate => format_date($ord->{'creationdate'}),
- closedate => format_date($ord->{'closedate'}),
+ creationdate => output_pref( { str => $ord->{'creationdate'} } ),
+ closedate => output_pref( { str => $ord->{'closedate'} } ),
};
}
push @{$loop_suppliers}, {
$new_dt = dt_from_string( $dt, 'iso' );
isa_ok( $new_dt, 'DateTime', 'Passed a DateTime dt_from_string returns it' );
-# C4::Dates allowed 00th of the month
-
my $ymd = '2012-01-01';
my $dt0 = dt_from_string( '00/01/2012', 'metric' );
isa_ok( $dt0, 'DateTime',
}
if ($datelastseen) {
- $datelastseen = format_date_in_iso($datelastseen);
+ $datelastseen = output_pref({ str => $datelastseen, dateformat => 'iso', dateonly => 1 });
push @where_strings, '(datelastseen < ? OR datelastseen IS NULL)';
push @bind_params, $datelastseen;
}
foreach my $new ( @$opac_news ) {
next unless $new->{'expirationdate'};
- #$new->{'expirationdate'}=format_date_in_iso($new->{'expirationdate'});
my @date = split (/-/,$new->{'expirationdate'});
if ($date[0]*$date[1]*$date[2]>0 && Date_to_Days( @date ) < Date_to_Days(&Today) ){
$new->{'expired'} = 1;