SteveV24
02-07-2003, 08:21 PM
I need to output tomorrows date out to a browser. I was able to come up with the following code, however when we get to the end of the month (like Feb 28th this month), I believe this code will output Feb 29. Any ideas on how to adjust this to make the actual next day display correctly at the last day of the month?
var mydate=new Date()
var day=mydate.getDay()
var month=mydate.getMonth()
var daym=mydate.getDate() + 1
var montharray=new Array("January","February","March","April","May","June","July","August","September","October","November","December")
var dayarray=new Array("Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday")
document.write(dayarray[day] + ", " + montharray[month]+ " " + daym);
var mydate=new Date()
var day=mydate.getDay()
var month=mydate.getMonth()
var daym=mydate.getDate() + 1
var montharray=new Array("January","February","March","April","May","June","July","August","September","October","November","December")
var dayarray=new Array("Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday")
document.write(dayarray[day] + ", " + montharray[month]+ " " + daym);