My code
nouveautes.forEach(function(nouveaute) {
console.log(nouveaute.createdAt.toLocaleString());
nouveaute.createdAt = nouveaute.createdAt.toLocaleString();
console.log(nouveaute.createdAt.getMonth());
nouveaute.createdAt = nouveaute.createdAt.getMonth() + " " + nouveaute.createdAt.getYear();
console.log(nouveaute.createdAt);
});
Output with 2 objects in array
2017-11-12 16:15:03
10
2017-11-12T15:15:03.000Z
2017-11-10 11:09:10
10
2017-11-10T10:09:10.000Z
I'd like to have :
In french :
// => Novembre 2017
Or if it's too difficult, in english :
// => November 2017