answer for others if needed...a database is not needed here...
Code:
<html>
<head>
</head>
<body>
<SCRIPT LANGUAGE="JavaScript">
//put this WHERE yu want it to print on screen
<!-- Begin
var date = new Date("May 9, 2005");//put in official last day of school here
var description = " school days left!";
var last_day = " Last Day!"
var now = new Date();
var diff = date.getTime() - now.getTime();
var days = Math.floor(diff / (1000 * 60 * 60 * 24));
var non_school_days = 13 //add weekend AND non school days(holidays) here
document.write("<center><h3>")
if (days > 1) {
document.write(days + 1 - non_school_days + description);
}
else if (days == 1) {
document.write("Only two days until " + description);
}
else if (days == 0) {
document.write("Tomorrow is " + last_day);
}
else {
document.write(description + "!");
}
document.write("</h3></center>");
// End -->
</script>
</body>
</html>
Bookmarks