public static function TimeValidator::checkTime in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony/validator/Constraints/TimeValidator.php \Symfony\Component\Validator\Constraints\TimeValidator::checkTime()
Checks whether a time is valid.
@internal
Parameters
int $hour The hour:
int $minute The minute:
int $second The second:
Return value
bool Whether the time is valid
2 calls to TimeValidator::checkTime()
- DateTimeValidator::validate in vendor/
symfony/ validator/ Constraints/ DateTimeValidator.php - Checks if the passed value is valid.
- TimeValidator::validate in vendor/
symfony/ validator/ Constraints/ TimeValidator.php - Checks if the passed value is valid.
File
- vendor/
symfony/ validator/ Constraints/ TimeValidator.php, line 37
Class
- TimeValidator
- @author Bernhard Schussek <bschussek@gmail.com>
Namespace
Symfony\Component\Validator\ConstraintsCode
public static function checkTime($hour, $minute, $second) {
return $hour >= 0 && $hour < 24 && $minute >= 0 && $minute < 60 && $second >= 0 && $second < 60;
}