phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] CVS: calendar/inc class.holidaycalc_US.inc.php,1.5,1.


From: Mark A Peters <address@hidden>
Subject: [Phpgroupware-cvs] CVS: calendar/inc class.holidaycalc_US.inc.php,1.5,1.5.2.1
Date: Tue, 19 Feb 2002 21:02:10 -0500

Update of /cvsroot/phpgroupware/calendar/inc
In directory subversions:/tmp/cvs-serv10403/calendar/inc

Modified Files:
      Tag: Version-0_9_14-branch
        class.holidaycalc_US.inc.php 
Log Message:
GNU Path #150 - holidaycalc - occurence holidays shown wrong.

Index: class.holidaycalc_US.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/calendar/inc/class.holidaycalc_US.inc.php,v
retrieving revision 1.5
retrieving revision 1.5.2.1
diff -C2 -r1.5 -r1.5.2.1
*** class.holidaycalc_US.inc.php        13 Jan 2002 14:39:05 -0000      1.5
--- class.holidaycalc_US.inc.php        20 Feb 2002 02:02:08 -0000      1.5.2.1
***************
*** 24,30 ****
                        {
                                $dow = 
$datetime->day_of_week($year,$holiday['month'],1);
!                               $day = (((7 * $holiday['occurence']) - 6) + 
(($holiday['dow'] - $dow) % 7));
                                $day += ($day < 1 ? 7 : 0);
!                               $day += ($holiday['dow']==1 ? 7 : 0);
                        }
                        else
--- 24,40 ----
                        {
                                $dow = 
$datetime->day_of_week($year,$holiday['month'],1);
!                               $day = (((7 * $holiday['occurence']) - 6) + 
((($holiday['dow'] + 7) - $dow) % 7));
                                $day += ($day < 1 ? 7 : 0);
!                               // What is the point of this?  
!                               // Add 7 when the holiday falls on a Monday???
!                               //$day += ($holiday['dow']==1 ? 7 : 0);
! 
!                               // Sometimes the 5th occurance of a weekday (ie 
the 5th monday)
!                               // can spill over to the next month.  This 
prevents that.  
!                               $ld = 
$datetime->days_in_month($holiday['month'],$year);
!                               if ($day > $ld)
!                               {
!                                       return;
!                               }
                        }
                        else
***************
*** 32,36 ****
                                $ld = 
$datetime->days_in_month($holiday['month'],$year);
                                $dow = 
$datetime->day_of_week($year,$holiday['month'],$ld);
!                               $day = $ld - ($dow - $holiday['dow']) % 7 ;
                        }
                }
--- 42,46 ----
                                $ld = 
$datetime->days_in_month($holiday['month'],$year);
                                $dow = 
$datetime->day_of_week($year,$holiday['month'],$ld);
!                               $day = $ld - (($dow + 7) - $holiday['dow']) % 7 
;
                        }
                }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]