Closed felix-cao closed 2 years ago
const thisWeek = () => { const endDate = moment().week(moment().week()).endOf('week').format(dateFormat); const startDate = moment().week(moment().week()).startOf('week').format(dateFormat); return { startDate, endDate } }
const lastMonth = () => { const endDate = moment().month(moment().month()).subtract(1,'months').endOf('month').format(dateFormat); const startDate = moment().month(moment().month()).subtract(1,'months').startOf('month').format(dateFormat); return { startDate, endDate } }
const thisMonth = () => { const endDate = moment().month(moment().month()).endOf('month').format(dateFormat); const startDate = moment().month(moment().month()).startOf('month').format(dateFormat); return { startDate, endDate } }
本周起始时间-结束时间
上周起始时间-结束时间
本月起始时间-结束时间
上月起始时间-结束时间