首页 > TAG信息列表 > toDateString

查漏补缺——说说递归

问题 如题所示 答案 相关源码: export function getTime(type) { if (type === 'start') { return new Date().getTime() - 3600 * 1000 * 24 * 90 } else { return new Date(new Date().toDateString()) } } 使用Date对象中toDateString判断日期是否当天 将Date对