<script>
// 日期输出的格式为星期,月份,天数,年份
var time = new Date()
var mon = time.getDate()+5 //每月的天数
var month = time.getMonth()//月份
var year = time.getFullYear()//年份
var day = time.getDay() //返回星期数
console.log(day)
var aa = ['星期日','星期一','星期二','星期三','星期四','星期五','星期六']
console.log('今天是'+year+'年' + month+'月'+mon+'日'+aa[day])
var newTime = new Date(year,month,mon)
var a = newTime.getDay()//判断五天后的是星期几
console.log(newTime)
console.log('五天后是'+aa[a])
</script>