I have the following script which returns the current date. How do I edit this code to make it return tomorrows date in the same format?
(current date) -- (date+1 to date+3) -- (date+4 to date+ 7)
or
(Oct 4th) -- (Oct 5th - 7th) -- (Oct 8th - 14th)
var objToday = new Date(),
weekday = new Array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'),
domEnder = function() { var a = objToday; if (/1/.test(parseInt((a + "").charAt(0)))) return "th"; a = parseInt((a + "").charAt(1)); return 1 == a ? "st" : 2 == a ? "nd" : 3 == a ? "rd" : "th" }(),
dayOfMonth = today + ( objToday.getDate() < 10) ? '0' + objToday.getDate() + domEnder : objToday.getDate() + domEnder,
months = new Array('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'),
curMonth = months[objToday.getMonth()];
var today = curMonth + " " + dayOfMonth;
document.write(today);
Any direct working answer would be great. I'm using Wordpress and will use a code snippet plugin to propagate this on the front-end with a shortcode.