How can I add the word "of" in the date using momentjs?
Example:4 de Mayo de XXXX
The day, month and year are the same, the important thing is to add the word "of" in the date.
How can I add the word "of" in the date using momentjs?
Example:4 de Mayo de XXXX
The day, month and year are the same, the important thing is to add the word "of" in the date.
Loading the locale for Spanish is that simple:
Here you have the way I would do it, you just have to change the language format, as nothing.
momentjs supports multiple formats depending on the culture you want. https://momentjs.com/
You just have to download the library with all the cultures and use the code that I put above.
https://momentjs.com/downloads/moment-with-locales.js
A variation of Pablo Lozano 's answer , you can have several languages and you decide which one to display, by default moment.js loads the English language:
Now with native Javascript it would be as follows:
Using [], for example: