How to put the current date on your web site

Would you like to add the current date on your web site?

I see many web sites selling eBooks and information products use this to trick their visitors so that the visitors think that the web site has been updated that same day.

To add the current date to the body text of your web site is easy.

Just go to the place where you want the date to be displayed. Then in html view paste the following script:

<script language="JAVASCRIPT" type="TEXT/JAVASCRIPT">
<!-- Hide script from old browsers
dayName = new Array ("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
monName = new Array ("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December")
now = new Date
document.write("" + dayName[now.getDay()] + ", " + monName[now.getMonth()] + " " + now.getDate() + ", 2009")
// End hiding script from old browsers -->
</script>

Then upload your page to your server and you are done.

I added the script in a txt file which you can download here

Download Current Date Script



Share and Enjoy:
  • Digg
  • del.icio.us
  • Google Bookmarks
  • LinkedIn
  • Technorati
  • blogmarks
  • Facebook
  • laaik.it
  • StumbleUpon
  • Yahoo! Buzz
  • Twitter

One Response to “How to put the current date on your web site”

  1. Devin says:

    Thanks for the code. It is easy and quick, and more importantly, it works.

    I have one question. Is there a way to change the font style?

    Thanks again!

Leave a Reply

Dansette

Pieter's Blog is Digg proof thanks to caching by WP Super Cache