Ok it seems there is no official method to do it so I use :
function dateDiffInDays(date1, date2)
{
var timeDiff = Math.abs(date2.getTime() - date1.getTime());
return Math.ceil(timeDiff / (1000 * 3600 * 24));
}
↧