function GetDayNum(no,type) {
if (type = = "35") {
var num7 = document.getElementById("6").value;
var value = document.getElementById("7").value;
var valueR = num7 ;
if (no == "7") {valueR = value;}//時間の値を識別します
if (num7 != "" && value != "") {//2 つの期間を指定できますマージされたバグ 1
var numValue = 0;
var day = 24 * 60 * 60 * 1000;
var dateArr = value.split("-"); var checkDate = new Date();
checkDate.setFullyear(dateArr[0], dateArr[1] - 1, dateArr[2]);
var checkTime = checkDate.getTime(); = num7.split ("-");
var checkDate2 = new Date();
checkDate2.setFullyear(dateArr2[0], dateArr2[1] - 1, dateArr2[2]); checkTime2 = checkDate2. getTime();
var numValue = (checkTime - checkTime2) //日数の差
var totleWeek = numValue / 7; >var yuDay = numValue % 7; //週全体の日数を除く
var lastDay = 0;
var startWeek = num7.replace(/-/g, "/"); 「-」から「/」へ。「-」は時間の計算において正確ではありません。私はこの
//var date = new Date(parseInt(startWeek[0]), parseInt(startWeek[1]), parseInt」をテストしました。 (startWeek[2]));
var date = Date.parse(startWeek);
var monthDay = dateNew.getDay(); Week
var endWeekDay = 0; //土曜日または日曜日は何日か
if ((weekDay == 6 && yuDay >= 2) || (weekDay == 7 && yuDay >= 1) || (weekDay == 5 && yuDay >= 3) || (weekDay == 3 && yuDay >= 5) || (weekDay == 4 && yuDay >= 5) yuDay >= 6) || (weekDay == 1 && yuDay >= 7)) {
endWeekDay = 2;www.jb51.net
}
if ((weekDay == 6 && yuDay) endWeekDay = 1; if (numValue == 0) { numValue = 1; }
numValue = numValue - (totleWeek * 2) - endWeekDay; //最終時刻
}
}