Hello again,
I have a calendar application where I display a whole month showing the year, months, days of week and dates for the month.
The calendar works properly on one of my Linux Apache PHP3 set-ups. On another server I get problems.
When I go to October 2000 instead of beginning on a Sunday it begins on a Saturday, and instead of showing 31 days it shows 30 days.
The variable $first_day where:
$month = 10;
$year = 2000;
$first_day = date( "w", mktime(0, 0, 0, $month, 1, $year));
returns the integer 6 instead of returning the integer 0.
Also the $number_of_days (in the month) variable where:
$month = 10;
$year = 2000;
$number_of_days = date( "t", mktime(0, 0, 0, $month, 1, $year));
returns 30 instead of 31.
I checked the values for February 2000, and the variables returned:
$first_day = 2;
$number_of_days = 29;
so I guess my application seems to be year 2000 compliant.
Does anyone have a clue about the October bug?
++Tx
Pete