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
 
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.