User:Maiko/countdown.js
From 2007.igem.org
Note: After saving, you may have to bypass your browser's cache to see the changes. Mozilla / Firefox / Safari: hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (Command-R on a Macintosh); Konqueror: click Reload or press F5; Opera: clear the cache in Tools → Preferences; Internet Explorer: hold Ctrl while clicking Refresh, or press Ctrl-F5.
today = new Date(); jamboree = new Date(2007,11,3); count = Math.ceil(( jamboree.getTime() - today.getTime() ) / (1000*60*60*24)); if(count > 0) { document.write('Jamboreeまでのこり', countdown ,'日!'); } else { document.write('当日!'); }