[Koha-cvs] koha/intranet/modules/C4/Calendar Calendar.pm [rel_TG]
Tumer Garip
tgarip at neu.edu.tr
Sun Mar 11 21:04:01 CET 2007
CVSROOT: /sources/koha
Module name: koha
Branch: rel_TG
Changes by: Tumer Garip <tgarip1957> 07/03/11 20:04:01
Modified files:
intranet/modules/C4/Calendar: Calendar.pm
Log message:
DateTime removed now uses Date::Calc
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/intranet/modules/C4/Calendar/Calendar.pm?cvsroot=koha&only_with_tag=rel_TG&r1=1.1.2.1&r2=1.1.2.2
Patches:
Index: Calendar.pm
===================================================================
RCS file: /sources/koha/koha/intranet/modules/C4/Calendar/Attic/Calendar.pm,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -b -r1.1.2.1 -r1.1.2.2
--- Calendar.pm 10 Mar 2007 01:37:55 -0000 1.1.2.1
+++ Calendar.pm 11 Mar 2007 20:04:01 -0000 1.1.2.2
@@ -20,8 +20,7 @@
use vars qw($VERSION @EXPORT);
use C4::Context;
-
-use C4::Date;
+use Date::Calc qw(Add_Delta_Days Day_of_Week);
# set the version for version checking
$VERSION = 1.01;
@@ -441,7 +440,7 @@
sub isHoliday {
my ($self, $day, $month, $year) = @_;
- my $weekday = Date_DayOfWeek($month, $day, $year) % 7;
+ my $weekday = Day_of_Week($month, $day, $year);
my $weekDays = $self->get_week_days_holidays();
my $dayMonths = $self->get_day_month_holidays();
my $exceptions = $self->get_exception_holidays();
@@ -546,22 +545,8 @@
return($count);
}
-sub Date_DayOfWeek{
-my ($month, $day, $year)=@_;
-my $date=DATE_obj($year."-".$month."-".$day);
-
-return $date->day_of_week;
-}
-sub Add_Delta_Days{
-my ($year, $month, $day, $offset)=@_;
-my $date=DATE_obj($year."-".$month."-".$day);
-my $duration=get_duration($offset." days");
- $date->add_duration($duration);
-
-return ($date->year, $date->month, $date->day);
-}
@@ -574,5 +559,5 @@
=head1 AUTHOR
Koha Physics Library UNLP <matias_veleda at hotmail.com>
-Modified by Tumer Garip NUE Grand Library --No more Date::Manip
+Modified by Tumer Garip NEU Grand Library --No more Date::Manip
=cut
\ No newline at end of file
More information about the Koha-cvs
mailing list