1.在js中需要求的当前日期的周一和周日 var now = new Date(); // 当前日期时间对象 var date = now.getDate(); // 当前是几号:当前日期在一个月中的第几天 var d2 = now.getDay(); // 当前周几: 当前日期在本周当中是周几 获取周一和周日的日期 ; // 距离周一几天 - mondayDistance) - ; // 距离周末几天 var monday = new Date(new Date().setDate(now.g…
//根据json中的日期格式,转换成yyyy-mm-dd HH:mm:ss function ChangeDateFormat(cellval) { var date = new Date(parseInt(cellval.replace("/Date(", "").replace(")/", ""), 10)); var month = date.getMonth() + 1 < 10 ? "0"…