Last active
June 26, 2019 14:13
-
-
Save JorgeMadson/da25e9f529088292583fc582a2e11d71 to your computer and use it in GitHub Desktop.
Devolve uma data e hora menos algumas horas atrás
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
/* | |
O 19 é a quantidade de horas atrás, só subistituir por outro valor. | |
*/ | |
new Date(new Date().setHours(new Date().getHours() - 19)).toLocaleString("pt-BR") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment