我成功地从Google中提取日历和活动。但是,我正在尝试下定结果。我想今天只为今天举办活动。任何帮助都非常感谢...谢谢。
$eventsParam = array("orderBy"=>startTime, "timeMin"=>date('d-m-Y') , "timeMax"=>date('d-m-Y'));
$eventList = $cal->events->listEvents('yoyoyo@gmail.com', $eventsParam);
foreach($eventList->getItems() as $eventList){
$eventsData = json_decode($eventList);
$eventDate = explode('T', $eventList->start->dateTime);
//Event summary
print "<br>Summary: ";
echo $eventList->summary;
//Event location
print "<br/> Location: ";
echo $eventList->location;
//Event date:
print "<br/> Date: ";
echo $eventDate[0];
//Event time:
print "<br/> Time: ";
$eventTime = explode('-', $eventDate[1]);
echo $eventTime[0];
echo "<hr>";
}