You are here

public function Subscription::getTrialEndDate in Commerce Recurring Framework 8

Gets the trial end timestamp as a DrupalDateTime object.

Return value

\Drupal\Core\Datetime\DrupalDateTime|null The trial end date/time, or NULL if not yet known.

Overrides SubscriptionInterface::getTrialEndDate

File

src/Entity/Subscription.php, line 521

Class

Subscription
Defines the subscription entity.

Namespace

Drupal\commerce_recurring\Entity

Code

public function getTrialEndDate() {
  if ($end_time = $this
    ->getTrialEndTime()) {
    return DrupalDateTime::createFromTimestamp($end_time);
  }
}