»
EnglishFrenchVietnamese

Print - Days Remaining script - JavaScriptBank.com

Full version: jsB@nk » Time » Counter » Days Remaining script
URL: https://www.javascriptbank.com/days-remaining-script.html

Days Remaining script © JavaScriptBank.comDisplay the days remaining until a specified date. Short and effective.

Full version: jsB@nk » Time » Counter » Days Remaining script
URL: https://www.javascriptbank.com/days-remaining-script.html



JavaScript
<script type="text/javascript">// Created by: Robin Jones :: http://www.robinjones1.freeuk.com/function daysTill() {  //----------  EDIT THE VARIABLES BELOW  ------------------  // EDIT THE VARIABLES BELOW  var day=1 // Day  var month=1 // Month  var year=2009 //Year  var event="New Year's Day 2009"  var end = "days left until"  //----------  END OF EDIT  -------------------------------  var daystocount=new Date(year, month -1, day)  today=new Date()  if (today.getMonth()==month && today.getDate()>day)  daystocount.setFullYear(daystocount.getFullYear())  var oneday=1000*60*60*24  var write = (Math.ceil((daystocount.getTime()-today.getTime())/(oneday)))  document.write('There are <strong>'+write +'</strong> '+end+' '+event)}</script><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<script>daysTill();</script><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->