PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Date and Time » Calendar » Bug #3073

Calendar_Month_Weekdays, empty days at year change

Details

Submitted2004-12-31 08:40 UTC
Fromphade at hot dot ee
Assignedquipo
StatusClosed
PackageCalendar
PHP Version4.3.9
OSRedhat 9
Roadmaps(Not assigned)

Comments

[2004-12-31 08:40 UTC] phade at hot dot ee

Description:
------------
Unless I am missing something empty days (days that stay to the following month) at the end of the last month of the year are incorrect. They display month number that is out of range and also do not adjust the year.

Reproduce code:
---------------
require_once "Calendar/Month/Weekdays.php";
$myMonth = new Calendar_Month_Weekdays(2004,12);

while($day = $myMonth->fetch()) {
print_r($day);
}

Expected result:
----------------
print_r() output of the first empty day in the while loop should look like this

calendar_day Object
(
[cE] => calendar_engine_unixts Object
(
)

[validator] =>
[year] => 2005
[month] => 1
[day] => 1
[hour] => 0
[minute] => 0
[second] => 0
[selected] =>
[children] => Array
(
)

[first] =>
[last] =>
[empty] => 1
)

Actual result:
--------------
print_r() output of the first empty day in the while loop looks like this:

calendar_day Object
(
[cE] => calendar_engine_unixts Object
(
)

[validator] =>
[year] => 2004
[month] => 13
[day] => 1
[hour] => 0
[minute] => 0
[second] => 0
[selected] =>
[children] => Array
(
)

[first] =>
[last] =>
[empty] => 1
)