var getCurrentWeek = function (day) { var days = ["周日", "周一", "周二", "周三", "周四", "周五", "周六"]; //定义数组 var week = []; //获取当前星期X(0-6,0代表星期天) var index = new Date(day).getDay(); //循环 for (va…
var nowdays = new Date(); var year = nowdays.getFullYear(); var month = nowdays.getMonth(); if(month==0){ month = 12; year = year-1; } if(month<10){ month = '0'+month; } var myDate = new Date(year,month,0); var startDate = year+'-'+month+'-01 00:00:0…