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

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

 

posted on 2016-12-27 15:08  laugher_ccc  阅读(14192)  评论(1编辑  收藏  举报

导航