Can someone guide me on JavaScript date range?
I want to calculate the date of one week and month from today's date; Ie, if today is "18 July 2010", the range for the week should be "11/07/2010 - 8/7/2010" and for the month "01/07/2010 - 18/07/2010".
Thank you for your guidance in advance.
Try it out:
var now = new date (); Var nextWeek = New Date (New Date (Now) .setDate (Now .getDate (+ + 7)); Var nextMonth = new date (new date (now) .setMonth (now .getMonth () + 1));
Comments
Post a Comment