I use the toLocaleDateString
method for formatting the date. This is how I do:
> var options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' };
> var today = new Date();
> today.toLocaleDateString("fr-FR", options);
"mercredi 23 octobre 2019" //The output
In French the usual format of the date is rather like this:
Mercredi, 23 octobre 2019
The first letter of the day of the week in capital letters and a comma just after. How can I adapt the code to this format?