I'm creating an application in which user enter a date and make a request. At server side I verify whether user has entered valid date or not . But what the problem comes is PHP isn't converting some of date user enters. For e.g
if user selects 13/10/15
with jquery datetimpicker and I print it,
print_r(date('Y-m-d',strtotime($this->request->post['delivery_date'])));
And its showing
1970-01-01
So I tried to check if any error is there or not. To do so I tried
$date = date_parse($this->request->post['delivery_date']);
print_r($date);
And it's showing an error
[error_count] => 1
[errors] => Array
(
[0] => Unexpected character
)
It works fine for other dates but not with some dates. What should I do? Any help will be appreciated.