var now = new Date() //当前日期
var year = now.getFullYear() //当前年份
var month = now.getMonth() + 1 //当前月份
var date = now.getDate() //当前日
var day = now.getDay() //当前星期几(0为星期日)
var hour = now.getHours() // 当前时间(时)
var minute = now.getMinutes() // 当前时间(分)
var second = now.gerSeconds() // 当前时间(秒)
var time = now.getTime() // 当前时间戳
var allDate = new Date(year, month, 0).getDate() //当月一共有多少天
var allWeek = Math.ceil((allDates + (firstDay - 1)) / 7) //当月一共有多少周
var firstDay = new Date(year, month - 1, 1).getDay() // 当月第一天是星期几
var weekBeginDate = formatDate(new Date(year, month - 1, date - day + 1)) //本周周一日期
var weekEndDate = formatDate(new Date(year, month - 1, date+ ( 7 - day))) //本周周日日期