獲取今天,昨天,本週,上週,本月,上月時間

//獲取今天 var nowDate= new Date(); //當天日期 console.log(nowDate); //今天是本週的第幾天 var nowDayOfWeek= nowDate.getDay(); console.log(nowDayOfWeek); //當前日 var nowDay = nowDate.getDate(); console.log(nowDay); //當前月
相關文章
相關標籤/搜索