var startTime=Date.parse(new Date('2020-02-28'));
var endTime=Date.parse(new Date('2020-02-29'));
$.alert((endTime-startTime)/1000/3600/24+''); //0 the same day, 1 the next day, -1 the previous day
var startTime=Date.parse(new Date('2020-02-28'));
var endTime=Date.parse(new Date('2020-02-29'));
$.alert((endTime-startTime)/1000/3600/24+''); //0 the same day, 1 the next day, -1 the previous day