public function ParserIcalDateModule::formatDateTime in iCal feed parser 7.2
Format datetime fields.
File
- includes/
ParserIcalDate.inc, line 108 - Classes for using date_api ical parsing.
Class
- ParserIcalDateModule
- @file Classes for using date_api ical parsing.
Code
public function formatDateTime($property_key, $property, ParserIcalComponentInterface $item, FeedsParserResult $result, FeedsSource $source) {
$dtstart = $item
->getProperty("dtstart");
$dtend = $item
->getProperty("dtend");
# drupal_set_message(print_r($dtstart, TRUE));
$dstart = new FeedsDateTime($dtstart["datetime"]);
$dend = new FeedsDateTime($dtend["datetime"]);
$dt = new FeedsDateTimeElement($dstart, $dend, $dtstart["tz"]);
# drupal_set_message(print_r($property_key, TRUE));
# drupal_set_message(print_r($dt, TRUE));
# drupal_set_message("<pre>" . print_r($item, TRUE) . "</pre>");
return $dt;
}