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.
Comments
Post a Comment