Using jQuery calendar we got date in "04/05/2011"
format.
I want to convert开发者_如何学Python this into "Wed, 6th Apr 2011"
.
Please help.
I would recommend to use the datepicker from the jqueryui library.
You can set the format of the datepicker like this.
$( ".selector" ).datepicker({ altFormat: 'D, d M y' });
find more here: http://jqueryui.com/demos/datepicker/
To convert the date in PHP just do something like this
$date = '04/05/2011';
$new_date = time('D, d M y', strtotime($date));
$new_date
will now have the data as you want it.
精彩评论