hersh — 2011-11-06T00:16:50-04:00 — #1
I'm not too experienced in this field but I know some.
I'm fixing up an eCommerce website and I want to add an feature - that on top of the add to cart button it should say let's say it's sunday "Orders placed now will ship monday" like this website http://robertscamera.com/photo/point-and-shoots/touchscreen/coolpix-s4000.html it should always write the next bussiness day.
I started something but it's not close to what I want:
var d=new Date();
var weekday=new Array(7);
document.write("Orders placed now will ship " + weekday[d.getDay()]);
system — 2011-11-06T00:45:42-04:00 — #2
If this isn't a homework exercise, there are a couple of other issues you might need to consider as well.
1) What if Monday is a public holiday?
hersh — 2011-11-06T00:52:25-04:00 — #3
system — 2011-11-06T01:09:14-04:00 — #4
ok, so it looks like this is a homework exercise of some kind and not a "real world" application.