IsYesterday
IsYesterday 添加 .isYesterday()
API 来指示 Day.js 对象是否是昨天。
¥IsYesterday adds .isYesterday()
API to indicates whether the Day.js object is yesterday or not.
var isYesterday = require("dayjs/plugin/isYesterday");
// import isYesterday from 'dayjs/plugin/isYesterday' // ES 2015
dayjs.extend(isYesterday);
dayjs().add(-1, "day").isYesterday(); // true