public function datetime($value): bool
    {
        if (!is_scalar($value)) {
            return false;
        }

        if (is_numeric($value)) {
            return true;
        }

        return (int)strtotime($value) != 0;
    }
public function datetime($value): bool
    {
        if (!is_scalar($value)) {
            return false;
        }

        if (is_numeric($value)) {
            return true;
        }

        return (int)strtotime($value) != 0;
    }
public function datetime ( $ value ) : bool { if ( ! is_scalar ( $ value ) ) { return false ; } if ( is_numeric ( $ value ) ) { return true ; } return ( int ) strtotime ( $ value ) != 0 ; }
Value has to be valid datetime definition including numeric timestamp.

@param mixed $value

@return bool
Value has to be valid datetime definition including numeric timestamp .