📜  获取昨天的日期时间角度 - Javascript代码示例

📅  最后修改于: 2022-03-11 15:02:43.131000             🧑  作者: Mango

代码示例1
const today = new Date()
const yesterday = new Date(today)

yesterday.setDate(yesterday.getDate() - 1)

today.toDateString()
yesterday.toDateString()