php - Want to create Google Clanedar event which repeats yearly -


i managed add event google calendar through php api client, want make event repeat every year , such company anniversay etc, didn't find in google documentation ,so should added while creating event repeatation

there documentation recurring event

$event = new google_service_calendar_event(); $event->setsummary('appointment'); $event->setlocation('somewhere'); $start = new google_service_calendar_eventdatetime(); $start->setdatetime('2011-06-03t10:00:00.000-07:00'); $start->settimezone('america/los_angeles'); $event->setstart($start); $end = new google_service_calendar_eventdatetime(); $end->setdatetime('2011-06-03t10:25:00.000-07:00'); $end->settimezone('america/los_angeles'); $event->setend($end); $event->setrecurrence(array('rrule:freq=yearly;until=20110701t170000z')); $attendee1 = new google_service_calendar_eventattendee(); $attendee1->setemail('attendeeemail'); // ... $attendees = array($attendee1,                    // ...                    ); $event->attendees = $attendees; $recurringevent = $service->events->insert('primary', $event);  echo $recurringevent->getid(); 

Comments