Fix for bug #424854 - Holiday calculations not correct.

This commit is contained in:
skeeter 2001-05-18 00:18:17 +00:00
parent cc14e680ae
commit 0340b45566

View File

@ -146,6 +146,7 @@ class calendar_holiday
{ {
$dow = $phpgw->calendar->day_of_week($this->year,$holiday['month'],1); $dow = $phpgw->calendar->day_of_week($this->year,$holiday['month'],1);
$day = (7 * $holiday['occurence'] - 6 + ($holiday['dow'] - $dow) % 7); $day = (7 * $holiday['occurence'] - 6 + ($holiday['dow'] - $dow) % 7);
$day += ($day < 1 ? 7 : 0);
} }
else else
{ {