datetime - Get next date from weekday in JavaScript -
how to return the next date of the given day (this number can be 0
-
Example, if today, on Friday 16 October 2009 :
- 16-Oct-2009
- Saturday Returns 17-Oct-2009 Saturday
- Thursday returns 22-Oct-2009
Just adding 7 does not fix the problem
The task given below will give you the next day of the week.
Work next day (x) {var now = new date (); Now.setDate (now .getDate () + (X + (7-now .getDay ())% 7); Now come back;}
Comments
Post a Comment