-
-
Save parzibyte/0a953a8fe02c485365a1de50ec1bf643 to your computer and use it in GitHub Desktop.
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
const formateadorFechasRelativas = new Intl.RelativeTimeFormat('en-US', { style: 'long', }); | |
const lanzamientoRE4 = new Date("2023-03-24T00:00:00"); | |
const ahora = new Date(); | |
const diferenciaEnMilisegundos = lanzamientoRE4.getTime() - ahora.getTime(); | |
const diferenciaEnDias = diferenciaEnMilisegundos/1000/60/60/24; | |
formateadorFechasRelativas.format(diferenciaEnDias, 'day'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment