var now = new Date()
var weekFirstDay = new Date(now- (now.getDay() - 1) * 86400000)
var firstMonth = Number(weekFirstDay.getMonth()) + 1
var weekLastDay = new Date((weekFirstDay / 1000 + 6 * 86400) * 1000)
var lastMonth = Number(weekLastDay.getMonth()) + 1
var currentWeek = weekFirstDay.getFullYear() + '-' + firstMonth + '-' + weekFirstDay.getDate() + '~' + weekLastDay.getFullYear() + '-' + lastMonth + '-' + weekLastDay.getDate()
其中注意getYear()和getFullYear()的区别