Created
August 7, 2019 21:30
-
-
Save parzibyte/dce6520b8c4262a8bffdcaad83752475 to your computer and use it in GitHub Desktop.
Fecha de ayer en JavaScript - https://parzibyte.me/blog/2018/10/05/fecha-de-ayer-manana-javascript/
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 fechaDeAyer = () => { | |
let hoy = new Date(); | |
let DIA_EN_MILISEGUNDOS = 24 * 60 * 60 * 1000; | |
let ayer = new Date(hoy.getTime() - DIA_EN_MILISEGUNDOS); | |
return ayer; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment