|
@@ -69,17 +69,18 @@
|
|
const year = new Date().getFullYear();
|
|
const year = new Date().getFullYear();
|
|
const month = new Date().getMonth();
|
|
const month = new Date().getMonth();
|
|
const day = new Date().getDate();
|
|
const day = new Date().getDate();
|
|
- var newDate = new Date(year, month, day, 0, 0, 0);
|
|
|
|
|
|
+ var newDate = new Date(year, month, day, 8, 0, 0);
|
|
|
|
+ console.log(newDate); // Wed Jan 13 2021 00:00:00 GMT+0800 (中国标准时间)
|
|
|
|
|
|
const startDateYear = startDate.getFullYear();
|
|
const startDateYear = startDate.getFullYear();
|
|
const startDateMonth = startDate.getMonth();
|
|
const startDateMonth = startDate.getMonth();
|
|
const startDateDay = startDate.getDate();
|
|
const startDateDay = startDate.getDate();
|
|
- startDate = new Date(startDateYear, startDateMonth, startDateDay, 0, 0, 0);
|
|
|
|
|
|
+ startDate = new Date(startDateYear, startDateMonth, startDateDay, 8, 0, 0);
|
|
|
|
|
|
- const endingDateYear = startDate.getFullYear();
|
|
|
|
- const endingDateMonth = startDate.getMonth();
|
|
|
|
- const endingDateDay = startDate.getDate();
|
|
|
|
- endingDate = new Date(endingDateYear, endingDateMonth, endingDateDay, 0, 0, 0);
|
|
|
|
|
|
+ const endingDateYear = endingDate.getFullYear();
|
|
|
|
+ const endingDateMonth = endingDate.getMonth();
|
|
|
|
+ const endingDateDay = endingDate.getDate();
|
|
|
|
+ endingDate = new Date(endingDateYear, endingDateMonth, endingDateDay, 8, 0, 0);
|
|
console.log(newDate); // Wed Jan 13 2021 00:00:00 GMT+0800 (中国标准时间)
|
|
console.log(newDate); // Wed Jan 13 2021 00:00:00 GMT+0800 (中国标准时间)
|
|
if(startDate.getTime() > newDate.getTime() || endingDate.getTime() < newDate.getTime()){
|
|
if(startDate.getTime() > newDate.getTime() || endingDate.getTime() < newDate.getTime()){
|
|
|
|
|