Created
October 2, 2020 10:01
-
-
Save FreePhoenix888/b74c87b9ecb4ffa21472d1bcdd7d681a 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
function getSecondsToTomorrow() { | |
let now = new Date(); | |
let tomorrow = new Date(now.getFullYear(), now.getMonth(), now.getDate()+1); | |
let diff = tomorrow - now; | |
return Math.round(diff / 1000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment