Topic: Bug in function "calcFTDate" of displays

Hi,
think there is something wrong in the "calcFTDate" function of the displays 1 to 3.
Found this, because of setting "First Day Of Week" to "1". But this did not work within the display files. So I tried to figure this out:

First: A PHP error is shown when using "WEEK" for from or till date

Notice: Undefined variable: set in /volume1/web/lc521ff090/display3.php on line 151 Notice: Trying to access array offset on value of type null in /volume1/web/lc521ff090/display3.php on line 151

To fix this the function should have the $set variable as global:

global $futEvts, $set;

Second: wrong brackets within in the function under "case: 'WEEK' "
Instead of

$dStamp = time() + ($set['weekStart'] + $wkDay * 86400) + ($mult * 604800); //time first day

it should be

$dStamp = time() + (($set['weekStart'] + $wkDay) * 86400) + ($mult * 604800); //time first day

Re: Bug in function "calcFTDate" of displays

Hi Stefan,

You are an excellent calendar tester Stefan! You're right!

I've changed the two bugs in display 1 - 3 and will include them in the next calendar version.

Thanks very much.

Roel