Validation of a date which checks if the string passed is a valid date. Allowed 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 spaceParameters | |||
---|---|---|---|
string
|
$value |
The date string being checked |
# |
string
|
$format = 'y-m-d' |
The date format to be validated against. Default is y-m-d for 2014-12-31 |
# |
Returns | |
---|---|
bool
|
TRUE on success; FALSE on failure |