public function DurationServiceInterface::getDateIntervalFromDurationString in Duration Field 8.2
Same name and namespace in other branches
- 3.0.x src/Service/DurationServiceInterface.php \Drupal\duration_field\Service\DurationServiceInterface::getDateIntervalFromDurationString()
Convert an ISO 8601 string into a PHP DateInterval object.
Parameters
string $durationString: Ann ISO 8601 duration string.
Return value
\DateInterval A PHP DateInterval object for the given ISO 8601 duration string.
Throws
Drupal\duration_field\Exception\InvalidDurationException Thrown if $value is not a valid ISO 8601 Duration string.
1 method overrides DurationServiceInterface::getDateIntervalFromDurationString()
- DurationService::getDateIntervalFromDurationString in src/
Service/ DurationService.php - Convert an ISO 8601 string into a PHP DateInterval object.
File
- src/
Service/ DurationServiceInterface.php, line 57
Class
- DurationServiceInterface
- Interface for classes providing services for the Duration Field module.
Namespace
Drupal\duration_field\ServiceCode
public function getDateIntervalFromDurationString($durationString);