Best Download Sites Login
Site Login

Certain Number Of Days Ahead

Description
This script will print out a date a certain number of days ahead of the current date. Just enter how many days ahead you want to display, and it will print out that date! Useful on order forms (tell a visitor after they order that you must receive their order by a date 3 weeks from today, etc....View A Script Demo


Do you find it confusing setting up these script?
Java Scripts Magic can do all the hard work for you all At The Touch Of A Button.


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<LINK href="general.css" rel="stylesheet" type="text/css">


</HEAD>

<BODY Background=../graphics/grayback.jpg>
<center><BR><BR><BR>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var AddDays = 3//  How many days ahead of the current date
TDate = new Date();
TDay = new Array('Sunday', 'Monday', 'Tuesday',
'Wednesday', 'Thursday', 'Friday', 'Saturday');
TMonth = new Array('January', 'February', 'March',
'April', 'May','June', 'July', 'August', 'September',
'October', 'November', 'December');
MonthDays = new Array('31', '28', '31', '30',
'31', '30', '31', '31', '30', '31', '30', '31');
function isLeapYear (Year) {
if (((Year % 4)==0) && ((Year % 100)!=0) || ((Year % 400)==0)) {
return true;
}
else {
return false;
   }
}
CurYear = TDate.getYear();
if (CurYear < 2000)       // Y2K Fix, Isaac Powell
CurYear = CurYear + 1900; // http://onyx.idbsu.edu/~ipowell
CurMonth = TDate.getMonth();
CurDayOw = TDate.getDay();
CurDay = TDate.getDate();
month = TMonth[CurMonth];
if (month == 'February')  {
if (((CurYear % 4)==0) && ((CurYear % 100)!=0) || ((CurYear %
400)==0)) {
MonthDays[1] = 29;
}
else {
MonthDays[1] = 28;
   }
}
days = MonthDays[CurMonth];
CurDay += AddDays;
if (CurDay > days) {
if (CurMonth == 11) {
CurMonth = 0;
month = TMonth[CurMonth];
CurYear = CurYear + 1
}
else {
month = TMonth[CurMonth+1];
}
CurDay = CurDay - days;
}
CurDayOw += AddDays;
function adjustDay (cday) {
if (cday > 6) {
cday -= 6;
CurDayOw = TDay[cday-1];
adjustDay(cday-1);
}
else {
CurDayOw = TDay[cday];
return true;

   }
}
adjustDay(CurDayOw);
TheDate  = CurDayOw + ', ';
TheDate += month + ' ';
TheDate += CurDay + ', ';
if (CurYear<100) CurYear="19" + CurYear;
TheDate += CurYear;
document.write("<center>");
document.write(AddDays + " days from now is ... " + TheDate);
document.write("</center>");
// End -->
</script>

</center>
</BODY>
</HTML>
 

Business Proposal If you have a Business Proposal that you think may be of interest to us here at Best Download Sites please contact us to discuss the matter in further detail