Function validate_datetime
Validation of a date/time which checks if the string passed is a valid date and time. Allowed date formats
d-m-y
31-12-2014 separators can be a period, dash, forward slash, but not allow spacem-d-y
12-31-2014 separators can be a period, dash, forward slash, but not allow spacey-m-d
2014-12-31 separators can be a period, dash, forward slash, but not allow space
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 date/time string being checked |
string |
$dateFormat = 'y-m-d' |
The date format only to be validated against. Default is y-m-d for 2014-12-31. |
string |
$timeFormat = 'both' |
The time format: 12, 24 or both |
boolean
|
TRUE on success; FALSE on failure |