/** * If the given format (must match the criterias of strftime) * is not null a string is returned otherwise a unix timestamp. * * @see http://www.php.net/mktime * @see http://www.php.net/strftime * @param $format * @return the end date of the event */ function get_end_date($format = null) { if (!$this->gc_end_date) { $when = $this->get_item_tags(SIMPLEPIE_NAMESPACE_GOOGLE_CALENDAR_ITEM, 'when'); $enddate = $when[0]['attribs']['']['endTime']; $this->gc_end_date = SimplePie_Item_GCalendar::tstamptotime($enddate); } if ($format != null) { return strftime($format, $this->gc_end_date); } return $this->gc_end_date; }
function get_end_time($as_timestamp = TRUE) { $when = $this->get_item_tags(SIMPLEPIE_NAMESPACE_GOOGLE_CALENDAR_ITEM, 'when'); $enddate = $when[0]['attribs']['']['endTime']; if ($as_timestamp) { return SimplePie_Item_GCalendar::tstamptotime($enddate); } return $enddate; }