这是由 gdata 的样本给出的
private static void dateRangeQuery(CalendarService service,
DateTime startTime, DateTime endTime) throws ServiceException,
IOException {
CalendarQuery myQuery = new CalendarQuery(eventFeedUrl);
myQuery.setMinimumStartTime(startTime);
myQuery.setMaximumStartTime(endTime);
// Send the request and receive the response:
CalendarEventFeed resultFeed = service.query(myQuery,
CalendarEventFeed.class);
System.out.println("Events from " + startTime.toString() + " to "
+ endTime.toString() + ":");
System.out.println();
for (int i = 0; i < resultFeed.getEntries().size(); i++) {
CalendarEventEntry entry = resultFeed.getEntries().get(i);
System.out.println("\t" + entry.getTitle().getPlainText());
}
System.out.println();
}
我认为您可以将 minitime 和 maxtime 设置为同一天?