Created
March 29, 2012 16:00
-
-
Save HeathHopkins/2238932 to your computer and use it in GitHub Desktop.
Blackboard counter
This file contains hidden or 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
| <html> | |
| <head> | |
| <title>Blackboard Countdown</title> | |
| </head> | |
| <body> | |
| <!-- Copy below this line --> | |
| <h2> | |
| <script type="text/javascript"> | |
| (function () { | |
| var endDate = new Date(2012, 11, 21, 0, 0, 0); | |
| var secs = Math.floor((endDate.getTime() - (new Date()).getTime()) / 1000); | |
| if (secs < 0) { | |
| document.write('Blackboard is no longer available.'); | |
| } else { | |
| var days = Math.floor(secs / 86400); | |
| if (days === 0) { | |
| document.write('Today is the last day that Blackboard is available.'); | |
| return; | |
| } | |
| var daystring = days === 1 ? ' day.' : ' days.'; | |
| document.write('Blackboard will no longer be available in ' + days + daystring); | |
| } | |
| })(); | |
| </script> | |
| </h2> | |
| <!-- Copy above this line --> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment