You are here

public static function TimestampHelper::isValidTimestamp in Node expire 7.2

Checks timestamp to be valid.

1 call to TimestampHelper::isValidTimestamp()
TimestampUtils::dateDbToStr in src/Module/Utils/TimestampUtils.php
Convert timestamp int to date string.

File

src/Module/CommonExpire/Conversion/TimestampHelper.php, line 95
TimestampHelper class.

Class

TimestampHelper
TimestampHelper class.

Namespace

Drupal\node_expire\Module\CommonExpire\Conversion

Code

public static function isValidTimestamp($timestamp) {
  return (string) (int) $timestamp === $timestamp && $timestamp <= PHP_INT_MAX && $timestamp >= ~PHP_INT_MAX;
}