Forgive me my english, i'm dutch ;-)
I want the folowing: If its thursday before 9pm, than i want it to display friday (27 hours later). With friday before 9pm i want it to display monday (75 hours later) etc. And i wat it to say it with the date behind it. Like this: Friday 19-09-2014 I have the following code:
function myFunction() {
var d = new Date();
if (weekday[1] || weekday[2] || weekday[3] || weekday[4]) {
d.setHours(d.getHours() + 27); //ma,di,wo,do voor 21.00 besteld, morgen binnen (ma->di,di->wo etc.)
} else if (weekday[0]) {
d.setHours(d.getHours() + 51); //zo besteld, 2 dagen later binnen (zo->di)
} else {
d.setHours(d.getHours() + 75); //vr,za besteld, 3 dagen later binnen (vr->ma, za->di)
}
var weekday = new Array(7);
weekday[0]= "Sunday";
weekday[1] = "Monday";
weekday[2] = "Tuesday";
weekday[3] = "Wednesday";
weekday[4] = "Thursday";
weekday[5] = "Friday";
weekday[6] = "Saturday";
var n = weekday[d.getDay()];
document.getElementById("demo").innerHTML = n;
}
myFunction()