would like an "auto" date on my front page - (this may be boring & trivial to

They have: 89 posts

Joined: Jul 1999

I've been working with html since march, but have not run across any page that shows the code for auto date. when i do "view page source" it only shows the exact date ~ no code.

thanks!

----------
[email protected] 2kcut.com
Millennium Cutlery: pocket knives & other cutlery-25% below retail

Military & Combat Knives. Hunting & Fishing Knives. Pocket Knives.
Kitchen Cutlery. Sharpeners.

Enter our Monthly Drawing!!

They have: 2,390 posts

Joined: Nov 1998

Do you want the exact code?
JP

----------
[red]The Next Step in Website Development [/red] - http://www.what-next.com
The Webmaster Promotion and Resource Center

John Pollock's picture

He has: 628 posts

Joined: Mar 1999

It can be done several ways. The easiest is probably SSI...JP had posted the SSI code for configuring it before but I can't seem to find it at the moment...

It can also be written to the page with a JavaScript, your best bet would be to look for a date script at
http://javascript.internet.com
or
http://www.javascripts.com

----------
Page Resource: http://www.pageresource.com
JavaScript City: http://www.javascriptcity.com

They have: 2,390 posts

Joined: Nov 1998

Jeez, Lloyd the SSI for this is only several characters long! Why go for this otpion instead?
JP

----------
[red]The Next Step in Website Development [/red] - http://www.what-next.com
The Webmaster Promotion and Resource Center

They have: 89 posts

Joined: Jul 1999

Pray, tell, Mr. Stones : ) !!!

----------
[email protected] 2kcut.com
Millennium Cutlery: pocket knives & other cutlery-25% below retail

They have: 5,633 posts

Joined: Jan 1970

INSERT WITHIN <HEAD></HEAD>

now = new Date();
var currentDay = now.getDay();
var currentDate = now.getDate() + '';
var dateAddon;
var currentMonth = now.getMonth();
var currentYear = now.getYear();
var dayList = new Array('Sunday','Monday','Tuesday','Wednesday','Thursday', 'Friday','Saturday');
var monthList = new Array('January','February','March','April','May','June','July', 'August','September','October','November','December');

if (currentDate.charAt(currentDate.length-1) == '1') { dateAddon = 'st'; }
else if (currentDate.charAt(currentDate.length-1) == '2') { dateAddon = 'nd'; }
else if (currentDate.charAt(currentDate.length-1) == '3') { dateAddon = 'rd'; }
else { dateAddon = 'th'; }
if (currentYear == 99) { currentYear = '19' + currentYear; }
else { currentYear = '20' + currentYear; }

var dateString = dayList[currentDay] + ' ' + currentDate + dateAddon + ' ' + monthList[currentMonth] + ' ' + currentYear;

INSERT WITHIN <BODY></BODY>

<script language="JavaScript"><!-- hide script from old browsers

document.write(dateString)

// end hiding from old browsers --></script>

----------
[email protected]
http://go.to/hass

They have: 5,633 posts

Joined: Jan 1970

<JP Stones> not all servers will support SSI! especially free ones.

----------
[email protected]
http://go.to/hass

They have: 2,390 posts

Joined: Nov 1998

This is the code supplied for those curious:
<!--#config timefmt="%A, %B %d %Y"-->
<!--#echo var="DATE_LOCAL"-->
Glad it was of use Smiling the %A etc bit can be modified greatly to suit your needs ask if you need help...
JP

----------
[red]The Next Step in Website Development [/red] - http://www.what-next.com
The Webmaster Promotion and Resource Center

They have: 2,390 posts

Joined: Nov 1998

Tiny, I have emailed you the code as requested.
Lloyd, good point, I forgot about that Sad
Thanks for putting me straight.
JP

----------
[red]The Next Step in Website Development [/red] - http://www.what-next.com
The Webmaster Promotion and Resource Center

They have: 89 posts

Joined: Jul 1999

JP ~ thank you SOOOOOOOO much. I'm delighted!

See for yourself:

----------
[email protected] 2kcut.com
Millennium Cutlery: pocket knives & other cutlery- up to 25% below retail

Military & Combat Knives. Hunting & Fishing Knives. Pocket Knives.
Kitchen Cutlery. Sharpeners.

Enter our Monthly Drawing!!

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.