繁花不似锦
您可以使用以下内容。如果您需要对下面的代码片段进行解释,请告诉我。var now = new Date();var [year, month, day] = [now.getFullYear(), now.getMonth(), now.getDate()];var todayFrom = new Date(year, month, day);var todayTo = new Date(year, month, day+1);todayTo = new Date(todayTo.getTime()-1);console.log(todayFrom);console.log(todayTo);console.log(todayFrom.getTime());console.log(todayTo.getTime());