You are here

public function FeedsDateTimeElement::__construct in Feeds 7

Same name and namespace in other branches
  1. 6 plugins/FeedsParser.inc \FeedsDateTimeElement::__construct()
  2. 7.2 plugins/FeedsParser.inc \FeedsDateTimeElement::__construct()

Constructor.

Parameters

$start: A FeedsDateTime object or a date as accepted by FeedsDateTime.

$end: A FeedsDateTime object or a date as accepted by FeedsDateTime.

$tz: A PHP DateTimeZone object.

Overrides FeedsElement::__construct

File

plugins/FeedsParser.inc, line 298

Class

FeedsDateTimeElement
Defines a date element of a parsed result (including ranges, repeat).

Code

public function __construct($start = NULL, $end = NULL, $tz = NULL) {
  $this->start = !isset($start) || $start instanceof FeedsDateTime ? $start : new FeedsDateTime($start, $tz);
  $this->end = !isset($end) || $end instanceof FeedsDateTime ? $end : new FeedsDateTime($end, $tz);
}