Testimonial

Hey Dave:

You are brilliant! I was skeptical when I reviewed Instant Site Maker. I mean, I am a professional Webmaster after all. The first thing I noticed was the simplicity of your tool. Just plug in the info and walla, a gorgeous web page. I'll be using this on my next mini-site project. Thanks for bringing Instant Site Maker to market. You've made my life easier and probably for thousands of others!

Jim Mandich, Storm Golf

_javascript date display



Just Copy the javascript code code below and put it between the <head> and </head> tags of your html page.

<script language=javascript>
function dispDate(dateVal) {
DaystoAdd=dateVal
TodaysDate = new Date();
TodaysDay = new Array('Sunday', 'Monday', 'Tuesday','Wednesday', 'Thursday', 'Friday', 'Saturday');
TodaysMonth = new Array('January', 'February', 'March','April', 'May','June', 'July', 'August', 'September','October', 'November', 'December');
DaysinMonth = new Array('31', '28', '31', '30', '31', '30', '31', '31', '30', '31', '30', '31');
function LeapYearTest (Year) {
if (((Year % 400)==0) || (((Year % 100)!=0) && (Year % 4)==0)) {
return true;
}
else {
return false;
}
}
CurrentYear = TodaysDate.getYear();
if (CurrentYear < 2000)
CurrentYear = CurrentYear + 1900;
currentMonth = TodaysDate.getMonth();
DayOffset = TodaysDate.getDay();
currentDay = TodaysDate.getDate();
month = TodaysMonth[currentMonth];
if (month == 'February') {
if (((CurrentYear % 4)==0) && ((CurrentYear % 100)!=0) || ((CurrentYear % 400)==0)) {
DaysinMonth[1] = 29;
}
else {
DaysinMonth[1] = 28;
}
}
days = DaysinMonth[currentMonth];
currentDay += DaystoAdd;
if (currentDay > days) {
if (currentMonth == 11) {
currentMonth = 0;
month = TodaysMonth[currentMonth];
CurrentYear = CurrentYear + 1
}
else {
month =
TodaysMonth[currentMonth+1];
}
currentDay = currentDay - days;
}
DayOffset += DaystoAdd;
function offsettheDate (offsetCurrentDay) {
if (offsetCurrentDay > 6) {
offsetCurrentDay -= 6;
DayOffset = TodaysDay[offsetCurrentDay-1];
offsettheDate(offsetCurrentDay-1);
}
else {
DayOffset = TodaysDay[offsetCurrentDay];
return true;
}
}
offsettheDate(DayOffset);TheDate  = DayOffset + ', ';
TheDate += month + ' ';
TheDate += currentDay + ', ';
if (CurrentYear<100) CurrentYear="19" + CurrentYear;
TheDate += CurrentYear;
document.write(' '+TheDate);
}

 

Then just call the function at the point you want the date to display, like so:

<script language=javascript>
dispDate(0)
</script>

The number in the brackets is the number of days you want to add to the current date.

 




Main Menu

web site tools
build a website blog
html help
html redirect
html marquee
html form
instant site maker
simple style sheet
is your site on life support
internet marketing
meta tags
perl cgi
javascript
javascript display date
email filters
simple email form
protect your code
disable right mouse
help visitors bookmark your site
free hosting vs paid
accept credit card payments
card payments using clickbank
newsletter
sep 29 newsletter
oct 10 newsletter
oct 24 newsletter
what is bandwidth
how much web space
contact us
resources
link to us
Links Directory

 

 

© All rights Reserved. No part of this site may be reproduced or copied without permission of the owners.
Site Directory