I have a static website featuring articles that never get updated. I'm trying to make it look like it's being updated every day or other day by placing dates that change on the top of the articles. I've tried to combine these scripts with no avail.
[FONT=Verdana, Arial, Helvetica][/FONT]
and this variable is supposed to let you change the current date to 1 or more days in the past
If someone can combine these to crap out a date that is always one or twos days ago I would be very grateful.
- Transplant
[FONT=Verdana, Arial, Helvetica][/FONT]
Code:
<SCRIPT>
// Courtesy of SimplytheBest.net - http://simplythebest.net/scripts/
var mydate=new Date()
var theYear=mydate.getFullYear()
var day=mydate.getDay()
var month=mydate.getMonth()
var daym=mydate.getDate()
if (daym<10)
daym="0"+daym
var dayarray=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
var montharray=new Array("January","February","March","April","May","June","July","August","September","October","November","December")
document.write(dayarray[day]+", "+montharray[month]+" "+daym+", "+theYear)
</SCRIPT>
and this variable is supposed to let you change the current date to 1 or more days in the past
Code:
var myDate=new Date();
myDate.setDate(myDate.getDate()-1);
- Transplant