Full version: jsB@nk » Time » Auto Expire script
URL: https://www.javascriptbank.com/auto-expire-script.html
Content will only be displayed between the 'Go Live' date and the 'Expires' date. Great for promotions that start on a certain date, and end on another date.
Full version: jsB@nk » Time » Auto Expire script
URL: https://www.javascriptbank.com/auto-expire-script.html
<SCRIPT LANGUAGE="JavaScript">// Don Demrow , http://www.geoanalytics.com/FromAndTo.htm// Set the dates belowvar goLiveDate = "20030613";var expireDate = "20101015";var expireYear = expireDate.substring(0,4)var expireMonth = expireDate.slice(4,-2)var expireDay = expireDate.slice(6)var liveYear = goLiveDate.substring(0,4)var liveMonth = goLiveDate.slice(4,-2)var liveDay = goLiveDate.slice(6)var nowDate = new Date();var day = nowDate.getUTCDate();var month = nowDate.getUTCMonth();var month1 = month + 1; if (month1 < 10) { month1 = "0" + month1; } if (day < 10) { day = "0" + day; }var year = nowDate.getYear();var GMTdate = year + "" + month1 + "" + dayif ((GMTdate < expireDate) && (GMTdate >= goLiveDate)){// Insert the text you want displayed belowdocument.write("<div align='center'><b>This content appeared on " + liveMonth + "/" + liveDay + "/" + liveYear + "<br>and will disappear on " + expireMonth + "/" + expireDay + "/" + expireYear +".</b></div>")}</script><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->