I am using the next code to convert a date received from a MySQL database format 1993-10-23 00:00:00
and display it in spanish:
alert(moment('1993-10-23 00:00:00', 'YYYY-MM-DD', 'es'));
23 oct is saturday. I would expect to get sábado
but I get the next:
Sat Oct 23 1993 00:00:00 GMT+0200
Also tried adding: moment.locale('es-ES');
, moment.locale('en-ES');
and moment.locale('es');
but neither works.
What's the correct way of converting dates from a language to another?
This seems to work, thanks @RobG