use C4::Reserves2;
# FIXME - C4::Search uses C4::Reserves2, which uses C4::Search.
# So Perl complains that all of the functions here get redefined.
+use C4::Date;
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
my $isth=$dbh->prepare($iquery);
$isth->execute;
if (my $idata=$isth->fetchrow_hashref){
- # FIXME - The date ought to be properly parsed, and printed
- # according to local convention.
- my @temp=split('-',$idata->{'date_due'});
- $datedue = "$temp[2]/$temp[1]/$temp[0]";
+ $datedue = format_date($idata->{'date_due'});
}
if ($data->{'itemlost'} eq '2'){
$datedue='Very Overdue';
# FIXME - If $data->{'datelastseen'} is NULL, perhaps it'd be prettier
# to leave it empty, rather than convert it to "//".
# Also ideally this should use the local format for displaying dates.
- my @temp=split('-',$data->{'datelastseen'});
- my $date="$temp[2]/$temp[1]/$temp[0]";
+ my $date=format_date($data->{'datelastseen'});
$data->{'datelastseen'}=$date;
$data->{'datedue'}=$datedue;
$data->{'class'}=$class;
use C4::Koha;
use C4::Auth;
use HTML::Template;
+use C4::Date;
# get all the data ....
my %env;
barcode => $idata->{'barcode'},
homebranch =>$homebranch,
holdingbranch => $holdingbranch,
- lastdate => $lastdate,
+ lastdate => format_date($lastdate),
count => $count,
branchloop => \@branchloop);
return "never";
}
my ($yr, $mo, $da, $hr, $mi) = (substr($date, 0, 4), substr($date, 4, 2), substr($date, 6, 2), substr($date, 8, 2), substr($date, 10, 2));
- return "$hr:$mi $da/$mo/$yr";
+ return "$hr:$mi " . format_date("$yr-$mo-$da");
}
use C4::Search;
use C4::Auth;
use C4::Interface::CGI::Output;
+use C4::Date;
my $query=new CGI;
my $type=$query->param('type');
use C4::Auth;
use C4::Interface::CGI::Output;
use HTML::Template;
+use C4::Date;
my $query = new CGI;
my ($template, $borrowernumber, $cookie)
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =localtime(time);
$year=$year+1900;
$mon++;
-my $date="$mday/$mon/$year";
+my $date=format_date("$year-$mon-$mday");
# get biblioitem information and build rows for form