Volume I - Issue VIII - August 2001
Tech Tips
Add the Current Date to Your Site
David Mortenson
Editor, EZ-NetAdvantage
Everyone likes to visit sites that are being continually updated. One trick that gives visitors the impression that your site has been updated recently is to add today's date as Carl did on his directory site made in EZ-NetTools. It can be seen at www.RexburgOnline.com. This simple JavaSript gets the date from the user's computer and prints it onscreen.

Note: If the end user's computer is displaying the incorrect date, the incorrect date will display on the site.

The RexburgOnline.com site uses a custom JavaScript made by TeamICServ. However, you can add a similar effect for free! I visited The JavaScript Source at http://javascript.internet.com and grabbed their most popular date script. The JavaScript Source is an excellent JavaScript resource with tons of "cut and paste" JavaScript examples for your web pages. The best part is they are all for free!

Follow These Directions to Put A Date on Your Page
1. In EZ-PageBuilder add an HTML Block in your page
2. Highlight the following script with your mouse and copy and paste it into your HTML block:

<SCRIPT LANGUAGE="JavaScript1.2"> 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>"); </SCRIPT> 3. Submit the block and voila! Your page now has the current date!

You can change the location of the date on your page by changing the location of the HTML block. With the Layout Manager Block, you can place the date virtually anywhere on the page. You can change the look of the date by using standard HTML font tags around the script. Good Luck!
EZ-NetAdvantage!™, EZ-Calendar™, EZ-MailingList™, EZ-FormBuilder™, EZ-FileManager™, EZ-LinkTrader™, EZ-Audio™, EZ-ColorPicker™, and EZ-PhotoAlbum™ are Trademarks (™) of ICServ® Inc. EZ-NetTools® is a Registered Trademark (®) of ICServ® Inc.