Date script

admin

Administrator
Staff member
Hi all,

I have a date script which run OK, but , what I want it to do is produce the date minus one month.

i.e if todays date is January 30th 2003 I want the script to display
December 30th 2003.

The Script:

<script language="JavaScript">
<!--
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
--!>
</script>

</HEAD>

<BODY>
<script>
document.write("<p align=center><font=arial color=#CC0000> Page last updated on " +
dayName[now.getDay()] + ", "+
monName[now.getMonth()] + " " +
now.getDate() + ".</font><\/p>")
</script>
</body>
</html>

Anyone have any ideas.

Regards and thanks in advance

Dereck
 
Back
Top