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.4,1.


From: Mark A Peters <address@hidden>
Subject: [Phpgroupware-cvs] CVS: calendar/inc class.holidaycalc_US.inc.php,1.4,1.5
Date: Sun, 13 Jan 2002 09:39:07 -0500

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

Modified Files:
        class.holidaycalc_US.inc.php 
Log Message:
Looks like it was improperly calculating holidays occuring on a sliding monday.

Index: class.holidaycalc_US.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/calendar/inc/class.holidaycalc_US.inc.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** class.holidaycalc_US.inc.php        4 Dec 2001 02:37:50 -0000       1.4
--- class.holidaycalc_US.inc.php        13 Jan 2002 14:39:05 -0000      1.5
***************
*** 24,29 ****
                        {
                                $dow = 
$datetime->day_of_week($year,$holiday['month'],1);
!                               $day = (7 * $holiday['occurence'] - 6 + 
($holiday['dow'] - $dow) % 7);
                                $day += ($day < 1 ? 7 : 0);
                        }
                        else
--- 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




reply via email to

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