You are here

public function ParserIcalDateTimeElement::buildDateField in iCal feed parser 6.2

Same name and namespace in other branches
  1. 7 includes/ParserIcalFeedsParser.inc \ParserIcalDateTimeElement::buildDateField()

Build a node's date CCK field from our object.

Overrides FeedsDateTimeElement::buildDateField

File

includes/ParserIcalFeedsParser.inc, line 86

Class

ParserIcalDateTimeElement
Overridden version of FeedsDateTimeElement that supports iCal specific parsing and repetition.

Code

public function buildDateField($node, $field_name) {
  parent::buildDateField($node, $field_name);
  if (empty($this->repeat_vals)) {
    return;
  }
  if (module_exists('date') && module_exists('date_repeat')) {
    include_once './' . drupal_get_path('module', 'date_repeat') . '/date_repeat_calc.inc';
    include_once './' . drupal_get_path('module', 'date') . '/date_repeat.inc';
    $field = content_fields($field_name);
    $node_field = $node->{$field_name}[0];
    $values = date_repeat_build_dates(NULL, $this->repeat_vals, $field, $node_field);
    $node->{$field_name} = $values;
  }
}