would like an "auto" date on my front page - (this may be boring & trivial to
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!!
JP Stones posted this at 19:26 — 28th September 1999.
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 posted this at 21:15 — 28th September 1999.
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
Java Script: A Beginner's Guide
Page Resource
JP Stones posted this at 04:53 — 1st October 1999.
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
tiny posted this at 19:53 — 1st October 1999.
They have: 89 posts
Joined: Jul 1999
Pray, tell, Mr. Stones : ) !!!
----------
[email protected] 2kcut.com
Millennium Cutlery: pocket knives & other cutlery-25% below retail
Anonymous posted this at 21:07 — 1st October 1999.
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
Anonymous posted this at 02:36 — 3rd October 1999.
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
JP Stones posted this at 21:57 — 4th October 1999.
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 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
JP Stones posted this at 22:40 — 4th October 1999.
They have: 2,390 posts
Joined: Nov 1998
Tiny, I have emailed you the code as requested.
Lloyd, good point, I forgot about that
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
tiny posted this at 00:43 — 5th October 1999.
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.