[Koha-cvs] koha/C4/Circulation Fines.pm [rel_3_0]

Antoine Farnault antoine at koha-fr.org
Tue Nov 14 16:03:07 CET 2006


CVSROOT:	/sources/koha
Module name:	koha
Branch:		rel_3_0
Changes by:	Antoine Farnault <toins>	06/11/14 15:03:07

Modified files:
	C4/Circulation : Fines.pm 

Log message:
	removing Date::Manip.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Circulation/Fines.pm?cvsroot=koha&only_with_tag=rel_3_0&r1=1.14.2.4&r2=1.14.2.5

Patches:
Index: Fines.pm
===================================================================
RCS file: /sources/koha/koha/C4/Circulation/Fines.pm,v
retrieving revision 1.14.2.4
retrieving revision 1.14.2.5
diff -u -b -r1.14.2.4 -r1.14.2.5
--- Fines.pm	30 Oct 2006 11:20:17 -0000	1.14.2.4
+++ Fines.pm	14 Nov 2006 15:03:07 -0000	1.14.2.5
@@ -1,6 +1,6 @@
 package C4::Circulation::Fines;
 
-# $Id: Fines.pm,v 1.14.2.4 2006/10/30 11:20:17 btoumi Exp $
+# $Id: Fines.pm,v 1.14.2.5 2006/11/14 15:03:07 toins Exp $
 
 # Copyright 2000-2002 Katipo Communications
 #
@@ -23,13 +23,14 @@
 require Exporter;
 use DBI;
 use C4::Context;
-use Date::Manip qw/UnixDate/;
+use Date::Calc qw/Today/;
 use vars qw($VERSION @ISA @EXPORT);
 use C4::Accounts2;
 
 
 # set the version for version checking
-$VERSION = 0.01;
+$VERSION = do { my @v = '$Revision: 1.14.2.5 $' =~ /\d+/g; 
+shift(@v) . "." . join("_", map {sprintf "%03d", $_ } @v); };
 
 =head1 NAME
 
@@ -190,16 +191,14 @@
 C<$date_dues> is the envisaged date of book return.
 
 C<$itemnumber> is the book's item number.
+
 =cut
 
 sub GetSpecialHolidays{
 my ($date_dues,$itemnumber) = @_;
 # calcul the today date
-my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =localtime(time);
-$mon++;
-$year=$year+1900;
-my $today=$year."-".$mon."-".$mday;
-$today=UnixDate($today, "%Y-%m-%d");
+my $today = join "-", &Today();
+
 # return the holdingbranch
 my $iteminfo=GetIssuesIteminfo($itemnumber);
 # use sql request to find all date between date_due and today





More information about the Koha-cvs mailing list