From 59d80a8ce0f01c23cdef9e4a6e395a9025fb1c0e Mon Sep 17 00:00:00 2001 From: Henri-Damien LAURENT Date: Sun, 4 Nov 2007 16:23:38 -0600 Subject: [PATCH] Removing Date::Manip Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- members/borrowers_details.pl | 1 - serials/subscription-add.pl | 10 +++++----- serials/subscription-copy.pl | 1 - 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/members/borrowers_details.pl b/members/borrowers_details.pl index b4f1181529..f3317c667a 100755 --- a/members/borrowers_details.pl +++ b/members/borrowers_details.pl @@ -25,7 +25,6 @@ # Suite 330, Boston, MA 02111-1307 USA use strict; -use Date::Manip; use CGI; use C4::Auth; use C4::Context; diff --git a/serials/subscription-add.pl b/serials/subscription-add.pl index 105e438226..c00280ee68 100755 --- a/serials/subscription-add.pl +++ b/serials/subscription-add.pl @@ -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++; diff --git a/serials/subscription-copy.pl b/serials/subscription-copy.pl index 7993f12abc..83cb26fc68 100755 --- a/serials/subscription-copy.pl +++ b/serials/subscription-copy.pl @@ -3,7 +3,6 @@ use strict; use CGI; -use Date::Manip; use C4::Koha; use C4::Auth; -- 2.39.5