📅  最后修改于: 2022-03-11 15:02:56.887000             🧑  作者: Mango
// will return number of days
function calculateDT() {
var oneD = 1000 * 60 * 60 * 24;
var startDT = ($("#ETDsdt").val());
var endDT = ($("#ETDedt").val());
var sMS = new Date(startDT);
var eMS = new Date(endDT);
return Math.round((eMS.getTime() - sMS.getTime()) / oneD);
}