//得到每周的第一天(周日)
function getFirstDateOfWeek(theDate){
 var firstDateOfWeek;
 theDate.setDate(theDate.getDate() - theDate.getDay()); // 
 firstDateOfWeek = theDate;
 return firstDateOfWeek; 
}
//得到每周的最后一天(周六)
function getLastDateOfWeek(theDate){
 var lastDateOfWeek;
 theDate.setDate(theDate.getDate() + 6 - theDate.getDay()); // 
 lastDateOfWeek = theDate;
 return lastDateOfWeek; 
}

相关文章:

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