Validation of a time which checks if the string passed is a valid time in 24-hour or 12-hour format or both Allowed inputs
Parameters | |||
---|---|---|---|
string
|
$value |
The time string being checked |
# |
string
|
$timeFormat = 'both' |
The time format: 12, 24 or both |
# |
Returns | |
---|---|
bool
|
TRUE on success; FALSE on failure |