public static function TimestampHelper::stringIntervalToTimestamp in Node expire 7.2
Converts string interval to timestamp.
1 call to TimestampHelper::stringIntervalToTimestamp()
- TimestampUtils::dateStrFromCfgDefault in src/
Module/ Utils/ TimestampUtils.php - Makes date string from default config value for node type.
File
- src/
Module/ CommonExpire/ Conversion/ TimestampHelper.php, line 45 - TimestampHelper class.
Class
- TimestampHelper
- TimestampHelper class.
Namespace
Drupal\node_expire\Module\CommonExpire\ConversionCode
public static function stringIntervalToTimestamp($str_interval) {
$dt = new \DateTime();
$dt
->setTimestamp(REQUEST_TIME);
$dt
->modify($str_interval);
$timestamp = $dt
->getTimestamp();
return $timestamp;
}