javascript - jQuery - Calculate date, six months from the input value -


i've input textbox write date, , way calculate 6 months input date.

input date format is:

dd/mm/yy 


example how should work:
input date: 01/07/13
how output function should be: 01/01/14

if have date:

var date = new date(year, month, day); 

to 6 months later, use:

date.setmonth(date.getmonth() + 6); 

demo: http://jsfiddle.net/gf6b6/


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -