src/Schema.php
protected function validateTimestamp($value, ValidationField $field) {
        if (is_numeric($value) && $value > 0) {
            $result = (int)$value;
        } elseif (is_string($value) && $ts = strtotime($value)) {
            $result = $ts;
        } else {
            $field->addTypeError($value, 'timestamp');
            $result = Invalid::value();
        }
        return $result;
    }
protected function validateTimestamp($value, ValidationField $field) {
        if (is_numeric($value) && $value > 0) {
            $result = (int)$value;
        } elseif (is_string($value) && $ts = strtotime($value)) {
            $result = $ts;
        } else {
            $field->addTypeError($value, 'timestamp');
            $result = Invalid::value();
        }
        return $result;
    }
protected function validateTimestamp ( $ value , ValidationField $ field ) { if ( is_numeric ( $ value ) && $ value > 0 ) { $ result = ( int ) $ value ; } elseif ( is_string ( $ value ) && $ ts = strtotime ( $ value ) ) { $ result = $ ts ; } else { $ field -> addTypeError ( $ value , 'timestamp' ) ; $ result = Invalid :: value ( ) ; } return $ result ; }
Validate a unix timestamp.

@param mixed $value The value to validate.
@param ValidationField $field The field being validated.
@return int|Invalid Returns a valid timestamp or invalid if the value doesn't validate.
Validate a unix timestamp .