chenchaochao

JS根据日期获取这周的周一

function getFirstDayOfWeek (date) {
    var day = date.getDay() || 7;
    return new Date(date.getFullYear(), date.getMonth(), date.getDate() + 1 - day);
};

 

分类:

技术点:

相关文章:

  • 2021-11-27
  • 2022-12-23
  • 2022-12-23
  • 2022-01-29
  • 2022-01-13
  • 2021-09-08
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-02-17
  • 2021-12-11
  • 2021-09-02
  • 2022-12-23
  • 2022-01-28
相关资源
相似解决方案