String password = googleSettingsForProject.get("password")
.toString();
String calendarId = googleSettingsForProject.get("calendarId")
.toString();
CalendarService service = new CalendarService("Dashboard");
service.setUserCredentials(username, password);
URL feedUrl = new URL("http://www.google.com/calendar/feeds/"
+ calendarId + "/private/full");
try {
CalendarQuery myQuery = new CalendarQuery(feedUrl);
Calendar cal = Calendar.getInstance();
myQuery.setMinimumStartTime(dateToGDateTime(cal.getTime()));
cal.add(Calendar.MONTH, 3);
myQuery.setMaximumStartTime(dateToGDateTime(cal.getTime()));
cal.add(Calendar.MONTH, -2);
myQuery.setMaxResults(100);
myQuery.setIntegerCustomParameter("max-results", 100);
// Send the request and receive the response:
CalendarEventFeed resultFeed = service.query(myQuery,
CalendarEventFeed.class);
for (CalendarEventEntry eventEntry : resultFeed
.getEntries()) {
for (When curTime : eventEntry.getTimes()) {