Active
Project:
Calendar Block
Version:
6.x-2.2
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Sep 2010 at 22:36 UTC
Updated:
22 Oct 2010 at 17:22 UTC
Near line 252 where you create "easy readable date for modules which use hook_calendar_block()", you pad the month manually if it is single digit but you forget to do the same with the day, rendering those provided date values invalid.
And a suggestion: instead of getting the length and using an inline IF, just use the sprintf() function of PHP to do it for you elegantly and efficiently:
$date->date = sprintf('%04d-%02d-%02d', $date->year, $date->month, $date->day);
or whichever order of the date elements you want.
Bye
Comments
Comment #1
andribas commentedthank you.