Php 如何按开始日期订购google日历订阅源

Php 如何按开始日期订购google日历订阅源,php,zend-framework,google-calendar-api,Php,Zend Framework,Google Calendar Api,如何按开始日期订购Google日历订阅源,而开始日期比现在早?我尝试了很多不同的方法,但都没有成功。我认为API中有一些函数,但我无法让它们工作。对不起,我的英语不好 这是我的密码 ` 函数输出日历($client) { $gdataCal=新的Zend_Gdata_日历($client); $eventFeed=$gdataCal->getCalendarEventFeed(); $d=0; foreach($eventFeed作为$event): $event->id->text=str\u

如何按开始日期订购Google日历订阅源,而开始日期比现在早?我尝试了很多不同的方法,但都没有成功。我认为API中有一些函数,但我无法让它们工作。对不起,我的英语不好

这是我的密码

`
函数输出日历($client)
{
$gdataCal=新的Zend_Gdata_日历($client);
$eventFeed=$gdataCal->getCalendarEventFeed();
$d=0;
foreach($eventFeed作为$event):
$event->id->text=str\u replace(“http://www.google.com/calendar/feeds/default/private/full/“,”,$event->id->text);
$descrEvent=$event->getContent();
如果(mb_strlen($descrEvent,“UTF-8”)>200)
$descrEvent=mb_substr($descrEvent,0,200,“UTF-8”)。”;
?>

开始日期: 结束日期:
`
我通过插入

$query = $gdataCal->newEventQuery();
$query->setVisibility('private');
$query->setOrderby('starttime');
$query->setSortOrder('ascending');
$eventFeed = $gdataCal->getCalendarEventFeed($query);
之后


您需要在URL中添加
orderby=starttime
(不知道如何使用ZEND GData)。我使用该URL获取事件代码。正如您所看到的,有str\u replace。
$query = $gdataCal->newEventQuery();
$query->setVisibility('private');
$query->setOrderby('starttime');
$query->setSortOrder('ascending');
$eventFeed = $gdataCal->getCalendarEventFeed($query);
$gdataCal = new Zend_Gdata_Calendar($client);