LRHand
10-28-2003, 09:10 AM
I am trying to teach my students today, tomorrow etc. But when developing a test in JScript found that displaying the days was more difficult than I anticipated.
To calculate the day before yesterday I tried
day = today.getDay()-2;
But if today is a Sunday i.e. 0 it doesn't work.
I have tried an if else statement but that doesn't work either.
What should I do?
To calculate the day before yesterday I tried
day = today.getDay()-2;
But if today is a Sunday i.e. 0 it doesn't work.
I have tried an if else statement but that doesn't work either.
What should I do?