Announcement

Collapse
No announcement yet.

Date

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Date

    I would like to place the current date on my web page in a format:

    Wednesday, 4 January 2006

    I've seen this on a number of websites and would like to know how it is done.

    Thanks

    #2
    Place this wherever you want the date to be displayed:

    Code:
    <script type="text/javascript">
    days=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
    months=new Array("January","February","March","April","May","June","July","August","September","October","November","December");
    var dt=new Date();
    document.write(days[dt.getDay()]+", "+dt.getDate()+" "+months[dt.getMonth()]+" "+dt.getFullYear());
    </script>
    www.gbradley.co.uk
    Web Development, Actinic Patches, Scripts & more

    Comment


      #3
      Thanks for the code...I'll give it a go

      Comment

      Working...
      X