You are here

public function DateRecurHelper::generateOccurrences in Recurring Dates Field 8.2

Same name and namespace in other branches
  1. 3.x src/DateRecurHelper.php \Drupal\date_recur\DateRecurHelper::generateOccurrences()
  2. 3.0.x src/DateRecurHelper.php \Drupal\date_recur\DateRecurHelper::generateOccurrences()
  3. 3.1.x src/DateRecurHelper.php \Drupal\date_recur\DateRecurHelper::generateOccurrences()

Calculates occurrences as a generator.

Parameters

\DateTimeInterface|null $rangeStart: The start of the range, or start with the first available occurrence.

\DateTimeInterface|null $rangeEnd: The end of the range, or never end.

Return value

\Generator|\Drupal\date_recur\DateRange[] A date range generator.

Overrides DateRecurHelperInterface::generateOccurrences

File

src/DateRecurHelper.php, line 89

Class

DateRecurHelper
Helper for recurring rules.

Namespace

Drupal\date_recur

Code

public function generateOccurrences(?\DateTimeInterface $rangeStart = NULL, ?\DateTimeInterface $rangeEnd = NULL) : \Generator {
  return $this->dateRecurHelper
    ->generateOccurrences($rangeStart, $rangeEnd);
}