Created
September 16, 2013 16:41
-
-
Save psql/6583169 to your computer and use it in GitHub Desktop.
Javascript countdown
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
<script type="text/javascript"> | |
today = new Date(); | |
BigDay = new Date("December 22, 2013"); | |
msPerDay = 24 * 60 * 60 * 1000 ; | |
timeLeft = (BigDay.getTime() - today.getTime()); | |
e_daysLeft = timeLeft / msPerDay; | |
daysLeft = Math.floor(e_daysLeft); | |
document.write(daysLeft + " days till San Francisco!"); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment