1 //昨天: 2 const yestoday = new Date().getTime() - 24*60*60*1000; 3 4 //今天: 5 const today = new Date(); 6 7 //明天: 8 const tomorrow = new Date().getTime() + 24*60*60*1000; 9 10 //最终的格式 如:2017-09-21
时间: 2024-10-03 21:42:51
1 //昨天: 2 const yestoday = new Date().getTime() - 24*60*60*1000; 3 4 //今天: 5 const today = new Date(); 6 7 //明天: 8 const tomorrow = new Date().getTime() + 24*60*60*1000; 9 10 //最终的格式 如:2017-09-21