Created
December 15, 2022 22:47
-
-
Save codigoconjuan/01b6b6fe6135b9d067d8f09d3bb326a5 to your computer and use it in GitHub Desktop.
Helper para fecha
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const formatearFecha = fecha => { | |
const opciones = { | |
year: 'numeric', | |
month: 'long', | |
day: '2-digit' | |
} | |
return new Date(fecha).toLocaleDateString('es-ES', opciones) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
gracias