Jump to content

Trying to use a get next date function and can't get 8/31/2013


njdubois

Recommended Posts

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
 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.