I need to write a script that changes an image once a week on the same day every week (for instance, every sunday).
So far I have written code that changes the image on the correct day but it only shows the image on the Sunday (as that's the only thing I can figure out at the moment).
Any help would be HUGELY appreciated!
Thank you in advance.
This is what my current code looks like:
var d = new Date()
var date = d.getDate()
var dow = new Array('sunday','monday','tuesday','wednesday','thursday','friday','saturday');
var dayd = d.getDay();
var weekday = dow[dayd]
if (date >= 1 && date <= 8 && weekday == "sunday")
else if (date >= 9 && date <= 16 && weekday == "sunday")
else if (date >= 17 && date <= 24 && weekday == "sunday")
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread