jquery - calculate the difference by using javascript betwenn the two dates -


here 2 date variable available.one date , 1 todaydate.

i need calculate day in between today date , date.

var s=jsonarray[0].new_startdate;//retrive s value json array  var datestring = s.substr(6); var currenttime = new date(parseint(datestring )); var month = currenttime.getmonth() + 1; var day = currenttime.getdate(); var year = currenttime.getfullyear();  var date = month  + "/" +day  + "/" + year;   var currentdatetime = new date();  var todaydate= (currentdatetime.getmonth() + 1) + '/' + currentdatetime.getdate() + '/' +  currentdatetime.getfullyear(); 

refer these links.

get difference between 2 dates in javascript?

how number of days between 2 dates in javascript?


Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -