Display the Date Using Javascript

Here a great little script that I used recently for a client, simply displays the date using javascript, but converts the months and days to the name of the month and weekday. 
Here it is.. 

<script language="javascript" type="text/javascript">
/* Time and date script.
FTW WEB DESIGN – For more great script go to;
http://www.ftwwwebdesign.com */

var thedate=new Date()
var year=thedate.getYear()
if (year < 1000)
year+=1900
var day=thedate.getDay()
var month=thedate.getMonth()
var daym=thedate.getDate()
if (daym<10)
daym="0"+daym
var daysarray=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
var monthsarray=new Array("January","February","March","April","May","June","July","August","September","October","November","December")
document.write("<i>"+daysarray[day]+", "+monthsarray[month]+" "+daym+", "+year+"</i>")
</script>     

If you need any help or anything with this script please leave a comment and I will get back to you.</p>