as for the document of the datapicker UI , I believe you do not need this function .
the document specifies that you can use the following formats :
COOKIE - 'D, dd M yy'
ISO_8601 - 'yy-mm-dd'
which are ,IMHO, compatible .
At any rate , there are many PHP functions that will help you do time – converstion, you should look at some of them here :
http://www.php.net/manual/en/ref.datetime.php
For example :
- date_parse_from_format
- strtotime (I used this one once to get a value from custom field to jQuery)
you could also define that in Jquery directly like this :
Date.firstDayOfWeek = 0;
Date.format="yyyy-mm-dd";
$(function()
{
$('.date-pick').datePicker()
});
If none of these solutions suit you there is also a specific plugin that might help :