Go Back   Internet Business Forums > Design & Development

Reply
 
Thread Tools Display Modes
Old 18-11-2006, 05:55 PM   #1 (permalink)
co-admin
 
army's Avatar
 
Join Date: Oct 2006
Location: Belgium
Posts: 666
Default [ SCRIPT ] Show current date

Tutorial Name: Show current date

Description: Use this script to write the current date to your web page.

Author: !i! Army !i!

Difficulty: beginner

Details:


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

[HTML]<SCRIPT LANGUAGE="JavaScript1.2">

<!-- Begin
var months=new Array(13);
months[1]="January";
months[2]="February";
months[3]="March";
months[4]="April";
months[5]="May";
months[6]="June";
months[7]="July";
months[8]="August";
months[9]="September";
months[10]="October";
months[11]="November";
months[12]="December";
var time=new Date();
var lmonth=months[time.getMonth() + 1];
var date=time.getDate();
var year=time.getYear();
if (year < 2000) // Y2K Fix, Isaac Powell
year = year + 1900; // http://onyx.idbsu.edu/~ipowell
document.write("<center>" + lmonth + " ");
document.write(date + ", " + year + "</center>");
// End -->
</SCRIPT>
</CENTER>[/HTML]
army is offline   Reply With Quote
Old 21-11-2006, 01:50 AM   #2 (permalink)
Senior Member
 
Join Date: Nov 2006
Posts: 225
Default Re: [ SCRIPT ] Show current date

thanks man! im putting this on my site right now!!! very cool, keep on rocking,
roy77
roy77 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


All times are GMT +1. The time now is 07:32 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.