Código PHP:
function getStrDate($fecha){
setlocale (LC_ALL, 'es_ES.ISO8859-1');
$str_date = strftime("%d %b %Y", strtotime($fecha));
return $str_date;
}
en el parámetro fecha puedes fechas como esta 2004-12-31
Mira más en
http://www.php.net/strtotime