Removing Date::Manip
authorHenri-Damien LAURENT <henridamien@koha-fr.org>
Sun, 4 Nov 2007 22:23:38 +0000 (16:23 -0600)
committerJoshua Ferraro <jmf@liblime.com>
Sun, 4 Nov 2007 22:26:48 +0000 (16:26 -0600)
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
members/borrowers_details.pl
serials/subscription-add.pl
serials/subscription-copy.pl

index b4f1181..f3317c6 100755 (executable)
@@ -25,7 +25,6 @@
 # Suite 330, Boston, MA  02111-1307 USA
 
 use strict;
-use Date::Manip;
 use CGI;
 use C4::Auth;
 use C4::Context;
index 105e438..c00280e 100755 (executable)
@@ -17,7 +17,7 @@
 
 use strict;
 use CGI;
-use Date::Manip;
+use Date::Calc qw(Today Day_of_Year Week_Of_Year);
 use C4::Koha;
 use C4::Auth;
 use C4::Date;
@@ -52,15 +52,15 @@ my ($template, $loggedinuser, $cookie)
 
 my $weekarrayjs='';
 my $count = 0;
-my ($year, $month, $day) = UnixDate("today", "%Y", "%m", "%d");
-my $firstday = Date_DayOfYear($month,$day,$year);
-my $wkno = Date_WeekOfYear($month,$day,$year,1); # week starting monday
+my ($year, $month, $day) = Today;
+my $firstday = Day_of_Year($year,$month,$day);
+my ($wkno,$yr) = Week_Of_Year($year,$month,$day); # week starting monday
 my $weekno = $wkno;
 for(my $i=$firstday;$i<($firstday+365);$i=$i+7){
         $count = $i;
         if($wkno > 52){$year++; $wkno=1;}
         if($count>365){$count=$i-365;}    
-        my ($y,$m,$d) = Date_NthDayOfYear($year,$count);
+        my ($y,$m,$d) = Add_Delta_Days(1,1,1,$i - 1);
         my $output = "$y-$m-$d";
         $weekarrayjs .= "'Wk $wkno: ".format_date($output)."',";
         $wkno++;    
index 7993f12..83cb26f 100755 (executable)
@@ -3,7 +3,6 @@
 
 use strict;
 use CGI;
-use Date::Manip;
 
 use C4::Koha;
 use C4::Auth;