[Top][All Lists]
[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.6 |
Date: |
Tue, 19 Feb 2002 21:01:57 -0500 |
Update of /cvsroot/phpgroupware/calendar/inc
In directory subversions:/tmp/cvs-serv10390/calendar/inc
Modified Files:
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.6
diff -C2 -r1.5 -r1.6
*** class.holidaycalc_US.inc.php 13 Jan 2002 14:39:05 -0000 1.5
--- class.holidaycalc_US.inc.php 20 Feb 2002 02:01:55 -0000 1.6
***************
*** 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
;
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: calendar/inc class.holidaycalc_US.inc.php,1.5,1.6,
Mark A Peters <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: etemplate/inc class.uietemplate_gtk.inc.php,NONE,1.1 class.etemplate.inc.php,1.1.1.1,1.2
- Next by Date:
[Phpgroupware-cvs] CVS: calendar/inc class.holidaycalc_US.inc.php,1.5,1.5.2.1
- Previous by thread:
[Phpgroupware-cvs] CVS: etemplate/inc class.uietemplate_gtk.inc.php,NONE,1.1 class.etemplate.inc.php,1.1.1.1,1.2
- Next by thread:
[Phpgroupware-cvs] CVS: calendar/inc class.holidaycalc_US.inc.php,1.5,1.5.2.1
- Index(es):