I changed the code. I have this function:
function Date(stringDate){
var date=moment(stringDate).locale('es').format('DD MMM');
if(date=="Invalid Date"){
return '-';
} else {
return date;
}
}
It still returns the date in english.