You are here

function date_ical_parse_exceptions in Date 7.2

Same name and namespace in other branches
  1. 5.2 date_api_ical.inc \date_ical_parse_exceptions()
  2. 5 date_api_ical.inc \date_ical_parse_exceptions()
  3. 6.2 date_api_ical.inc \date_ical_parse_exceptions()
  4. 6 date_api_ical.inc \date_ical_parse_exceptions()
  5. 7.3 date_api/date_api_ical.inc \date_ical_parse_exceptions()
  6. 7 date_api/date_api_ical.inc \date_ical_parse_exceptions()

Parse exception dates (can be multiple values).

Return value

array An array of date value arrays.

2 calls to date_ical_parse_exceptions()
date_ical_parse in date_api/date_api_ical.inc
Returns an array of iCalendar information from an iCalendar file.
date_repeat_split_rrule in date_repeat/date_repeat.module
Parse an iCal rule into a parsed RRULE array and an EXDATE array.

File

date_api/date_api_ical.inc, line 500
Parse iCal data.

Code

function date_ical_parse_exceptions($field, $data) {
  $data = str_replace($field . ':', '', $data);
  $items = array(
    'DATA' => $data,
  );
  $ex_dates = explode(',', $data);
  foreach ($ex_dates as $ex_date) {
    $items[] = date_ical_parse_date('', $ex_date);
  }
  return $items;
}