You are here

public function DurationServiceInterface::getDurationStringFromDateInterval in Duration Field 3.0.x

Same name and namespace in other branches
  1. 8.2 src/Service/DurationServiceInterface.php \Drupal\duration_field\Service\DurationServiceInterface::getDurationStringFromDateInterval()

Converts a PHP DateINterval object to an ISO 8601 duration string.

Parameters

\DateInterval $dateInterval: A PHP DateInterval object.

Return value

string The ISO 8601 duration string for the given \DateInterval.

1 method overrides DurationServiceInterface::getDurationStringFromDateInterval()
DurationService::getDurationStringFromDateInterval in src/Service/DurationService.php
Converts a PHP DateINterval object to an ISO 8601 duration string.

File

src/Service/DurationServiceInterface.php, line 88

Class

DurationServiceInterface
Interface for classes providing services for the Duration Field module.

Namespace

Drupal\duration_field\Service

Code

public function getDurationStringFromDateInterval(DateInterval $dateInterval);