HOME | CONTACT | TESTIMONIALS | ABOUT US |  ON-LINE STORE      

 

At ReWritables, you'll find hundreds of free resources including Java Scripts, HTML Tips and tricks and more. 
Our Free banner gallery has hundreds of free images.  Need custom animation, graphics design or web site 
graphics?  We'll be glad to help!

 

Date and Time Javascript

This script allows your pages to be date and time stamped. 

 


<!-- STEP ONE: Copy this code into the BODY of your HTML document -->

<BODY>

<CENTER>
<SCRIPT LANGUAGE="JavaScript">

<!-- free javascripts at www.rewritables.net -->

<!-- Begin
Stamp = new Date();
year = Stamp.getYear();
if (year < 2000) year = 1900 + year;
document.write('<font size="2" face="Arial"><B>' + (Stamp.getMonth() + 1) +"/"+Stamp.getDate()+ "/"+ year + '</B></font><BR>');
var Hours;
var Mins;
var Time;
Hours = Stamp.getHours();
if (Hours >= 12) {
Time = " P.M.";
}
else {
Time = " A.M.";
}
if (Hours > 12) {
Hours -= 12;
}
if (Hours == 0) {
Hours = 12;
}
Mins = Stamp.getMinutes();
if (Mins < 10) {
Mins = "0" + Mins;

document.write('<font size="2" face="Arial"><B>' + Hours + ":" + Mins + Time + '</B></font>');
// End -->
</SCRIPT>

MORE
FREE STUFF!

 

 

Terms of Use | Press Room | About Us | Contact Us | Feedback

Copyrightę2003 ReWritables Incorporated