复制代码 代码如下:
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 != "") {//两个时间段可以融合 BUG1
var numValue = 0;
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();
var dateArr2 = num7.split("-");
var checkDate2 = new Date();
checkDate2.setFullYear(dateArr2[0], dateArr2[1] - 1, dateArr2[2]);
var checkTime2 = checkDate2.getTime();
var numValue = (checkTime - checkTime2) / day; //相差的总天数
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 dateNew = new Date(date);
var weekDay = dateNew.getDay(); //星期几
var endWeekDay = 0; //多余的天数有几天是周六或者周日
if ((weekDay == 6 && yuDay >= 2) || (weekDay == 7 && yuDay >= 1) || (weekDay == 5 && yuDay >= 3) || (weekDay == 4 && yuDay >= 4) || (weekDay == 3 && yuDay >= 5) || (weekDay == 2 && yuDay >= 6) || (weekDay == 1 && yuDay >= 7)) {
endWeekDay = 2;www.jb51.net
}
if ((weekDay == 6 && yuDay < 1) || (weekDay == 7 && yuDay < 5) || (weekDay == 5 && yuDay < 2) || (weekDay == 4 && yuDay < 3) || (weekDay == 3 && yuDay < 4) || (weekDay == 2 && yuDay < 5) || (weekDay == 1 && yuDay < 6)) {
endWeekDay = 1;
}
// if (numValue == 0) { numValue = 1; }
numValue = numValue - (totleWeek * 2) - endWeekDay; //最终时间
}
}
}
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 != "") {//两个时间段可以融合 BUG1
var numValue = 0;
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();
var dateArr2 = num7.split("-");
var checkDate2 = new Date();
checkDate2.setFullYear(dateArr2[0], dateArr2[1] - 1, dateArr2[2]);
var checkTime2 = checkDate2.getTime();
var numValue = (checkTime - checkTime2) / day; //相差的总天数
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 dateNew = new Date(date);
var weekDay = dateNew.getDay(); //星期几
var endWeekDay = 0; //多余的天数有几天是周六或者周日
if ((weekDay == 6 && yuDay >= 2) || (weekDay == 7 && yuDay >= 1) || (weekDay == 5 && yuDay >= 3) || (weekDay == 4 && yuDay >= 4) || (weekDay == 3 && yuDay >= 5) || (weekDay == 2 && yuDay >= 6) || (weekDay == 1 && yuDay >= 7)) {
endWeekDay = 2;www.jb51.net
}
if ((weekDay == 6 && yuDay < 1) || (weekDay == 7 && yuDay < 5) || (weekDay == 5 && yuDay < 2) || (weekDay == 4 && yuDay < 3) || (weekDay == 3 && yuDay < 4) || (weekDay == 2 && yuDay < 5) || (weekDay == 1 && yuDay < 6)) {
endWeekDay = 1;
}
// if (numValue == 0) { numValue = 1; }
numValue = numValue - (totleWeek * 2) - endWeekDay; //最终时间
}
}
}
标签:
时间差,周六周日
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件!
如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
暂无“js 取时间差去掉周六周日实现代码”评论...
RTX 5090要首发 性能要翻倍!三星展示GDDR7显存
三星在GTC上展示了专为下一代游戏GPU设计的GDDR7内存。
首次推出的GDDR7内存模块密度为16GB,每个模块容量为2GB。其速度预设为32 Gbps(PAM3),但也可以降至28 Gbps,以提高产量和初始阶段的整体性能和成本效益。
据三星表示,GDDR7内存的能效将提高20%,同时工作电压仅为1.1V,低于标准的1.2V。通过采用更新的封装材料和优化的电路设计,使得在高速运行时的发热量降低,GDDR7的热阻比GDDR6降低了70%。
更新动态
2024年11月16日
2024年11月16日
- 《怪猎荒野》PS5Pro主机版对比:B测性能都不稳定
- 黄宝欣.1992-黄宝欣金装精选2CD【HOMERUN】【WAV+CUE】
- 群星.1996-宝丽金流行爆弹精丫宝丽金】【WAV+CUE】
- 杜德伟.2005-独领风骚新歌精选辑3CD【滚石】【WAV+CUE】
- 安与骑兵《心无疆界》[低速原抓WAV+CUE]
- 柏菲唱片-群星〈胭花四乐〉2CD[原抓WAV+CUE]
- 金典女声发烧靓曲《ClassicBeautifulSound》2CD[低速原抓WAV+CUE]
- 王杰1992《封锁我一生》粤语专辑[WAV+CUE][1G]
- 群星《一人一首成名曲 (欧美篇)》6CD[WAV/MP3][7.39G]
- 东来东往2004《回到我身边·别说我的眼泪你无所谓》先之唱片[WAV+CUE][1G]
- MF唱片-《宝马[在真HD路上]》2CD[低速原抓WAV+CUE]
- 李娜《相信我》新时代[WAV+CUE]
- 2019明达发烧碟MasterSuperiorAudiophile[WAV+CUE]
- 蔡幸娟.1993-相爱容易相处难【飞碟】【WAV+CUE】
- 陆虎.2024-是否愿意成为我的全世界【Hikoon】【FLAC分轨】