import moment from "@/utils/moment_set"; const dateFormat = 'YYYY/MM/DD' const dateTimeFormat = 'YYYY/MM/DD HH:mm:ss' // 获取近30天日期范围 const getNearlyMonthRange = () => { let startDate = moment().subtract(30, 'days').format(dateFormat); let endDate = moment().format(dateFormat); return { startTime: startDate, endTime: endDate }; } // 获取当前日期时间 const getCurrDateTime = () => { return moment().format(dateTimeFormat); } export default { getNearlyMonthRange, getCurrDateTime, }