Symfony 2 - Generate calendar month table with links to events in it
===

I have an Entity called `Event`, with fields `startDate`, `startTime`, `endDate` and `endTime`. `startDate` and `endDate` are dates of which `endDate` can be NULL if it is the same of `startTime` (I can change this behaviour if it makes things easier as I have no events yet). `startTime` and `endTime` can not be NULL. It also has an `isOnDate(\DateTime $date)` method, which returns `true` if the event will run on the given date.

It was like pain, but I finally generated an HTML table of any given calendar month, passing the day of week of the month's first day (`firstDow`) and the number of days in that month (`numDays`) as template variables.

The next step would be to make some table cells links to event or event listing pages if the given days has one or more events. Now I'm a bit stuck, as I don't know how to get the DateTime() object of each cell in a template.

Can someone give me a hint on this? Or am I making it totally wrong?