La cadena que tengo: 2021-11-02T00:00:00.000Z. Necesito mostrar esto como 02 de noviembre de 2021.
¿Podría alguien ayudarme con esto, por favor?
Le gustaría usar lo que ha proporcionado la clase Date, aquí hay un ejemplo completo.
const date = new Date('2021-11-02T00:00:00.000Z') const month = date.toLocaleString('default', { month: 'long' }) const day = date.getDay() const year = date.getFullYear() console.log(`${month} ${day}, ${year}`)Puedes hacer algo como esto en vainilla JS
const options = { year: 'numeric', month: 'long', day: 'numeric' }; console.log(new Date('2021-11-02T00:00:00.000Z').toLocaleDateString("en-US", options));