Bugzilla – Attachment 44941 Details for
Bug 14954
Remove C4::Dates from holiday related files in folder tools
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14954: Remove unused C4::Calendar::addDate subroutine
Bug-14954-Remove-unused-C4CalendaraddDate-subrouti.patch (text/plain), 2.08 KB, created by
Brendan Gallagher
on 2015-11-18 00:58:52 UTC
(
hide
)
Description:
Bug 14954: Remove unused C4::Calendar::addDate subroutine
Filename:
MIME Type:
Creator:
Brendan Gallagher
Created:
2015-11-18 00:58:52 UTC
Size:
2.08 KB
patch
obsolete
>From 95ff25031738f7fc24c858795c29aa723709567e Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 11 Nov 2015 12:59:44 +0000 >Subject: [PATCH] Bug 14954: Remove unused C4::Calendar::addDate subroutine > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> > >Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com >--- > C4/Calendar.pm | 39 --------------------------------------- > 1 file changed, 39 deletions(-) > >diff --git a/C4/Calendar.pm b/C4/Calendar.pm >index 92eb6b3..99b0c3a 100644 >--- a/C4/Calendar.pm >+++ b/C4/Calendar.pm >@@ -695,45 +695,6 @@ sub copy_to_branch { > return 1; > } > >-=head2 addDate >- >- my ($day, $month, $year) = $calendar->addDate($date, $offset) >- >-C<$startdate> is the starting date of the interval. >- >-C<$offset> Is the number of days that this function has to count from $date. >- >-=cut >- >-sub addDate { >- my ($self, $startdate, $offset) = @_; >- $startdate = eval { output_pref( { dt => $startdate, dateonly => 1, dateformat => 'iso' } ); }; >- my ( $year, $month, $day) = split( "-", $startdate ); >- my $daystep = 1; >- if ($offset < 0) { # In case $offset is negative >- # $offset = $offset*(-1); >- $daystep = -1; >- } >- my $daysMode = C4::Context->preference('useDaysMode'); >- if ($daysMode eq 'Datedue') { >- ($year, $month, $day) = &Date::Calc::Add_Delta_Days($year, $month, $day, $offset ); >- while ($self->isHoliday($day, $month, $year)) { >- ($year, $month, $day) = &Date::Calc::Add_Delta_Days($year, $month, $day, $daystep); >- } >- } elsif($daysMode eq 'Calendar') { >- while ($offset != 0) { >- ($year, $month, $day) = &Date::Calc::Add_Delta_Days($year, $month, $day, $daystep); >- if (!($self->isHoliday($day, $month, $year))) { >- $offset = $offset - $daystep; >- } >- } >- } else { ## ($daysMode eq 'Days') >- ($year, $month, $day) = &Date::Calc::Add_Delta_Days($year, $month, $day, $offset ); >- } >- my $date_ret = sprintf(ISO_DATE_FORMAT,$year,$month,$day); >- return($date_ret); >-} >- > 1; > > __END__ >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 14954
:
43098
|
43300
|
43410
|
43957
|
44077
|
44136
|
44390
|
44403
|
44585
|
44586
|
44587
|
44588
|
44589
|
44591
|
44592
|
44749
|
44750
|
44751
|
44752
|
44938
|
44939
|
44940
| 44941