»
EnglishFrenchVietnamese

Print - Days Left script - JavaScriptBank.com

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

Days Left script © JavaScriptBank.comProcrastinators everywhere, rejoice! If many of your projects end up being due on the first of the month, do you know how many days do you have left? This JavaScript calculates and displays the number of days (not weekdays) left in the current month in a snap. And, the script has no trouble with leap year or Y2K.

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



HTML
<SCRIPT LANGUAGE="JavaScript">// Justin Smith ([email protected])var today = new Date();var now = today.getDate();var year = today.getYear();if (year < 2000) year += 1900; // Y2K fixvar month = today.getMonth();var monarr = new Array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);// check for leap yearif (((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0)) monarr[1] = "29";// display day leftdocument.write("There are " + (monarr[month]-now) + " days left in this Month.");</script><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->