The number of entries read from the Google Calendar feed is set by maxResults. When the last day shown has several entries, this may well lead to an incomplete list of entries for that day.
I created a workaround where I increase maxResults with ExtraResults (a global variable I added) before getting the feed, and check in 'if (dateString != prevDateString)' whether the counter is greater than the original maxResults. If so, I break out of the for-loop:
for (var i = 0; i < len; i++)
{
//Some code not shown here
if (dateString != prevDateString) {
// Append the previous list of events to the widget
if (eventList != null) {
eventDiv.appendChild(eventList);
}
//ADDED BY ME: begin
//Exit for-loop when starting a new day, if enough events are shown
if (i > maxResults - ExtraResults){
break
}
//ADDED BY ME: end
// Create a date div element
This satisfied my needs; but probably you can come up with a more elegant solution.
It may also be part of a solution for the "Max days rather than max results?" wish.