const time2str = (time) => {
const nowTimeStamp = new Date(time)
const year = nowTimeStamp.getFullYear()
const month = nowTimeStamp.getMonth() + 1
const day = nowTimeStamp.getDate()
return `${year}-${month}-${day}`
}
const timeStampDate = new Date()
const rightNow = timeStampDate.getTime()
const dayOfWeek = timeStampDate.getDay()
const nowDate = time2str(rightNow)
const firstDayOfWeekTimeStamp = rightNow - (dayOfWeek - 1) * 3600 * 24 * 1000
const firstDayOfWeek = time2str(firstDayOfWeekTimeStamp)
console.info('timeStamp test', nowDate, firstDayOfWeek)