When you have planned activities over 2013, trying to get this report enters in an endless loop.
I have investigated the bug and the result is that function weekFormat from projector.php is wrong:
function weekFormat($dateValue) {
return date('Y-W', strtotime ($dateValue) );
}
This year, week 52 ends on december the 30th.
Monday 31th is assumed to be in week 1 of year 2013.
But weekFormat(), when you provide "2012-12-31" as $dateValue returns "2012-01".
So, a test for similar cases shall be added to weekFormat in order to avoid the bug.
Regards,
Sam
Hello,
I think I have any solution :
$w = (date('W', strtotime ($dateValue)));
$m = (date('m', strtotime ($dateValue)));
if($w == 1 && $m == 12)
{
return date("Y-W", strtotime("+1 year", strtotime($dateValue."-01" )));
}
else return date('Y-W', strtotime ($dateValue));
Great !
Fixing will be included in V3.1.
Thanks for your contribution.