public function DateRange::__construct in Recurring Dates Field 8.2
Same name and namespace in other branches
- 3.x src/DateRange.php \Drupal\date_recur\DateRange::__construct()
- 3.0.x src/DateRange.php \Drupal\date_recur\DateRange::__construct()
- 3.1.x src/DateRange.php \Drupal\date_recur\DateRange::__construct()
Creates a new DateRange.
Parameters
\DateTimeInterface $start: The start date.
\DateTimeInterface $end: The end date.
File
- src/
DateRange.php, line 34
Class
- DateRange
- Defines a date range.
Namespace
Drupal\date_recurCode
public function __construct(\DateTimeInterface $start, \DateTimeInterface $end) {
$this->start = clone $start;
$this->end = clone $end;
$this
->validateDates();
}