1
This commit is contained in:
2026-03-19 19:08:06 +08:00
parent 8a73115261
commit cadecbe64c

View File

@ -2144,6 +2144,13 @@ export default function App() {
// 调整到下一个工作时间开始点
const adjustToNextWorkingHour = (date: Date, calculationMethod: string, weekendDays: number[] = [], excludedDates: string[] = []): Date => {
const result = new Date(date);
if (!isBusinessDay(result, weekendDays, excludedDates)) {
while (!isBusinessDay(result, weekendDays, excludedDates)) {
result.setDate(result.getDate() + 1);
}
result.setHours(9, 0, 0, 0);
return result;
}
if (calculationMethod === '内部') {
const hour = result.getHours();