public function FeedsDateTimeElement::__construct in Feeds 7.2
Same name and namespace in other branches
- 6 plugins/FeedsParser.inc \FeedsDateTimeElement::__construct()
- 7 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 555 - Contains FeedsParser and related classes.
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);
}