编辑代码

function getNextWorkingDay(currentDate) {
    const holidays = {
        ""
    }
  const date = new Date(currentDate);
  
  // 增加一天
  date.setDate(date.getDate() + 1);
  
  // 判断是否为工作日(周一至周五)
  if (date.getDay() === 6) { // 如果是周六,增加两天
    date.setDate(date.getDate() + 2);
  } else if (date.getDay() === 0) { // 如果是周日,增加一天
    date.setDate(date.getDate() + 1);
  }
  //判断是否在法定节假日内
  
  // 返回下个工作日的日期
  const nextWorkingDay = date.toLocaleDateString("zh-CN", {
    year: "numeric",
    month: "2-digit",
    day: "2-digit"
  });
  return nextWorkingDay;
}

// 测试示例
const currentDate = new Date();
const nextWorkingDay = getNextWorkingDay(currentDate);
console.log(nextWorkingDay);