whetherSameWeek(myDate){ var myDate = newDate() ; let nowWeek = myDate.getDay(); //获取当前星期X(0-6,0代表星期天) if(nowWeek == 0) nowWeek = 7; nowWeek --;
let nowTime = myDate.getTime(); //获取当前时间(从1970.1.1开始的毫秒数) let hour = myDate.getHours(); //获取当前小时数(0-23) let minute = myDate.getMinutes(); //获取当前分钟数(0-59) let second = myDate.getSeconds(); //获取当前秒数(0-59) let milSecond = myDate.getMilliseconds(); //获取当前毫秒数(0-999) let mondayDate = cc.sys.localstorage.getltem("MondayDate"); //周一的时间 用来判断是否是新的一周