function TimeSpan::getDurationAsIso8601Abnf
Same name and namespace in other branches
- 11.x core/lib/Drupal/Core/TypedData/Plugin/DataType/TimeSpan.php \Drupal\Core\TypedData\Plugin\DataType\TimeSpan::getDurationAsIso8601Abnf()
Attributes
Return value
string ABNF-formatted duration.
Overrides DurationInterface::getDurationAsIso8601Abnf
1 call to TimeSpan::getDurationAsIso8601Abnf()
- TimeSpan::getDuration in core/
lib/ Drupal/ Core/ TypedData/ Plugin/ DataType/ TimeSpan.php - Returns the duration.
File
-
core/
lib/ Drupal/ Core/ TypedData/ Plugin/ DataType/ TimeSpan.php, line 41
Class
- TimeSpan
- The time span data type represents durations as number of seconds.
Namespace
Drupal\Core\TypedData\Plugin\DataTypeCode
public function getDurationAsIso8601Abnf() : string {
return 'PT' . $this->value . 'S';
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.