function TimeValidator::checkTime
Checks whether a time is valid.
@internal
1 call to TimeValidator::checkTime()
- TimeValidator::validate in vendor/
symfony/ validator/ Constraints/ TimeValidator.php - Checks if the passed value is valid.
File
-
vendor/
symfony/ validator/ Constraints/ TimeValidator.php, line 32
Class
- TimeValidator
- @author Bernhard Schussek <bschussek@gmail.com>
Namespace
Symfony\Component\Validator\ConstraintsCode
public static function checkTime(int $hour, int $minute, float $second) : bool {
return $hour >= 0 && $hour < 24 && $minute >= 0 && $minute < 60 && $second >= 0 && $second < 60;
}