You are here

public function RecurringPeriodInterface::getPeriodContainingDate in Recurring Time Period 8

Gets a period object that contains the given date.

For some period plugins, such as rolling periods, this will return a period identical to that returned by getPeriodFromDate().

Parameters

\DateTimeImmutable $date: A date and time that should be contained in the period.

Return value

\Drupal\recurring_period\Datetime\Period The period value object.

1 method overrides RecurringPeriodInterface::getPeriodContainingDate()
RecurringPeriodBase::getPeriodContainingDate in src/Plugin/RecurringPeriod/RecurringPeriodBase.php
Gets a period object that contains the given date.

File

src/Plugin/RecurringPeriod/RecurringPeriodInterface.php, line 136

Class

RecurringPeriodInterface
Defines an interface for recurring period plugins.

Namespace

Drupal\recurring_period\Plugin\RecurringPeriod

Code

public function getPeriodContainingDate(\DateTimeImmutable $date);