javascript - How do I modify setDate to getFullYear less 1 day? -


i not finding way modify end date warranty 1 full year less day. here code if can or point me right post answer? here function have now.

function setstdwarrenddate(date) {             var stddate = $.datepicker.parsedate('mm/dd/yy', date);             stddate.setfullyear(stddate.getfullyear() + 1);             $('#stdwarrantyenddate').val($.datepicker.formatdate('mm/dd/yy', stddate ));         } 

use:

stddate.setfullyear(stddate.getfullyear() + 1); stddate.setdate(stddate.getdate() - 1); 

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 -