日期
Date.prototype.toLocaleString()
时区转换
// 当前时区转换到 Shanghai 时区,并使用字符串输出
const d = new Date().toLocaleString('zh', {timeZone: 'Asia/Shanghai'});
// 重新使用 Date 构造函数创建 Date 对象
const e = new Date(d);
// 月份 -1
e.setMonth(e.getMonth() - 1);
// 格式化
this.orderDate = [parseTime(e, '{y}-{m}-{d}') + ' 00:00:00', parseTime(new Date(d), '{y}-{m}-{d}') + ' 23:59:59'];
小于 1 分钟