SunQuest
 
           Code Bank
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingCode Bank

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today!
  #1  
Old February 6th, 2004, 12:40 PM
Rich's Avatar
Rich Rich is offline
Administrator
Developer Shed Admin.
 
Join Date: Sep 2003
Location: Fort Lauderdale, FL
Posts: 151 Rich User rank is Sergeant (500 - 2000 Reputation Level)Rich User rank is Sergeant (500 - 2000 Reputation Level)Rich User rank is Sergeant (500 - 2000 Reputation Level)Rich User rank is Sergeant (500 - 2000 Reputation Level)Rich User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 11 h 37 sec
Reputation Power: 10
YALMS (Yet Another 'Last Modified' Script)

<HTML>

<HEAD>
<!------------------------------------------########## Script Part 1 ###################Copy this part into the HEAD of your page------------------------------------------->
<SCRIPT LANGUAGE=JAVASCRIPT>
//<!--
function getLongDateString()


{ //method defined on class Date.
//Returns a date string of the form: Day DD Month,YYYY
//(e.g. Sunday 27 September, 1998)
monthNames = new Array("January","February","March",
"April","May","June","July",
"August","September","October",
"November","December");
dayNames = new Array("Sunday","Monday","Tuesday",
"Wednesday","Thursday",
"Friday","Saturday");
dayOfWeek = this.getDay();
day = dayNames[dayOfWeek];
dateOfMonth = this.getDate();
monthNo = this.getMonth();
month = monthNames[monthNo];
year = this.getYear();
if (year <=60) //assume that documents authored after 1960
year = 2000+year;
else
year = 1900+year;
dateStr = day+" "+dateOfMonth+" "+month+", "+year;
return dateStr;
}
//register the method in the class Date
Date.prototype.getLongDateString=getLongDateString ;
function DocDate()


{ //return the document modification date (excl.time)
//as a string
DateTimeStr = document.lastModified;
secOffset = Date.parse(DateTimeStr);
if (secOffset == 0 || secOffset == null) //Opera3.2
dateStr = "Unknown";
else


{
aDate = new Date();
aDate.setTime(secOffset);
//use method defined above
datestr = aDate.getLongDateString();
}
return dateStr;
}
// --></script>
<!------------------------------------------########## End of Script Part 1 ############------------------------------------------->
<TITLE>YALMS</TITLE>
</HEAD>
<BODY bgcolor="#000000" text="#FFFF00" link="#00FFFF" vlink="#C0C0C0">
<P align="center"><Img src="../../bitmaps/jsbanner.gif" width="500" height="25"></P>
<H2 align="center">YALMS (Yet Another "Last Modified"
Script)</H2>
<P align="center"> </P>
<!------------------------------------------########## Script Part 2 ###################Copy this part into the BODY of your page------------------------------------------->
<SCRIPT LANGUAGE=JAVASCRIPT>
//<!--
document.write("<CENTER> Last Update: ");
document.writeln(DocDate(),"</CENTER>");
// -->
</SCRIPT>
<!------------------------------------------########## End of Script Part 2 ############------------------------------------------->
<P align="center"> </P>
<P align="center">
The date shown above is "automatically" updated
every time you modify your page(s).<BR> The script has been tested
with Netscape Communicator, Internet Explorer 4.0 and Opera 3.2.
Have fun. </P>
</BODY>
</HTML>

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingCode Bank > YALMS (Yet Another 'Last Modified' Script)


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway