njdubois Posted August 27, 2013 Share Posted August 27, 2013 Hello! I've been working with code snippets I find here: http://stackoverflow.com/questions/9307878/get-next-date-and-day I'm currently using this one: var d=new Date(start_date); alert(d); d.setTime((d.getTime() + 86400 * 1000*1)); The problem is the same no matter what chunk of code I use. 8/31/2013 is always skipped. So if I select a range between 8/29/2013 and 8/31/2013, alert(d) pops up 8/29 8/30 and 9/1 I really need a working get next date function. Am not using jquery. This is my last ditch effort. After this I'm just going to write one myself that does it manually. Get total days in month, split todays date. Add one to day, is days over total days in month days=1, month++ if month >12.... and so on... But why re invent the wheel? Thanks for the help, Nick Link to comment https://forums.phpfreaks.com/topic/281607-trying-to-use-a-get-next-date-function-and-cant-get-8312013/ Share on other sites More sharing options...
njdubois Posted August 27, 2013 Author Share Posted August 27, 2013 nevermind, wrote the get next day function my self. it was easy! thanks anyways Link to comment https://forums.phpfreaks.com/topic/281607-trying-to-use-a-get-next-date-function-and-cant-get-8312013/#findComment-1447025 Share on other sites More sharing options...
requinix Posted August 27, 2013 Share Posted August 27, 2013 d.setDate(d.getDate() + 1) Link to comment https://forums.phpfreaks.com/topic/281607-trying-to-use-a-get-next-date-function-and-cant-get-8312013/#findComment-1447035 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.