Function validate_time
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
- 23:59 or 01:00 or 1:00
- 23:59:59 or 01:00:00 or 1:00:00
- 11:59am or 01:00pm or 1:00pm
- 11:59 am or 01:00 pm or 1:00 PM or 1:00PM
- 11:59:59am 01:00:00pm or 1:00:00pm
- 11:59:59 AM 01:00:00 PM or 1:00:00PM
Package: PHPLucidFrame\Core
Copyright: Copyright (c), PHPLucidFrame.
License: MIT License This source file is subject to the MIT license that is bundled with this source code in the file LICENSE
Author: Sithu sithu@phplucidframe.com
Located at helpers/validation_helper.php
Copyright: Copyright (c), PHPLucidFrame.
License: MIT License This source file is subject to the MIT license that is bundled with this source code in the file LICENSE
Author: Sithu sithu@phplucidframe.com
Located at helpers/validation_helper.php
string |
$value |
The time string being checked |
string |
$timeFormat = 'both' |
The time format: 12, 24 or both |
boolean
|
TRUE on success; FALSE on failure |