How would I make this script that displays the current date, into something that shows the date 1 week ago? Also, so I understand the different commands, the dates for 3 days ago, 2 weeks ago, 1 month ago and say 3 years ago, just to mix it up a bit. Or is it even possible with this script?
Quote:
<script language="Javascript">
<!--
/*
Today's date script
Visit java-scripts.net or
http://wsabstract.com for this script
*/
var dayName = new Array ("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")
var monName = new Array ("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December")
var now = new Date
document.write("Today is " + dayName[now.getDay()] + ", " + monName[now.getMonth()] + " "+now.getDate() +".")
//-->
</script>
|
Ohh yea, and its creation is credited to
http://www.wsabstract.com/