I noticed recently that the function Valid::date has stopped working for timestamp.
/**
* Tests if a string is a valid date string.
*
* @param string $str date to check
* @return boolean
*/
public static function date($str)
{
return (strtotime($str) !== FALSE);
}
Example:
$str = 1499385600; // 07/07/2017
var_dump(strtotime($str) !== FALSE); // false
$str = 1500422400; // 07/19/2017
var_dump(strtotime($str) !== FALSE); // true