You are here

public function DurationServiceInterface::checkDurationInvalid 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::checkDurationInvalid()
  2. 8 src/Service/DurationServiceInterface.php \Drupal\duration_field\Service\DurationServiceInterface::checkDurationInvalid()

Checks if a given string is a valid ISO 8601 duration string.

Parameters

string $duration: The string whose format should be checked.

Return value

bool

  • TRUE if the string is a valid ISO 8601 duration string
  • FALSE if it's an invalid format

See also

http://en.wikipedia.org/wiki/Iso8601#Durations

1 method overrides DurationServiceInterface::checkDurationInvalid()
DurationService::checkDurationInvalid in src/Service/DurationService.php
Checks if a given string is a valid ISO 8601 duration string.

File

src/Service/DurationServiceInterface.php, line 24

Class

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

Namespace

Drupal\duration_field\Service

Code

public function checkDurationInvalid($duration);