You are here

public static function DurationServiceInterface::checkDurationInvalid in Duration Field 8

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

Checks if a given duration is a valid Iso8601 duration format.

@input string $duration The string whose format should be checked

Return value

bool

  • TRUE if the string is a valid format
  • 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 duration is a valid Iso8601 duration format.

File

src/Service/DurationServiceInterface.php, line 22

Class

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

Namespace

Drupal\duration_field\Service

Code

public static function checkDurationInvalid($duration);