tdesign-vue-next-starter/src/utils/date.ts
PY a5b177e8e1 refactor: login page replace form component (#9)
Co-authored-by: pengYYYYY <pengyue970715@gmail.com>
2021-11-27 18:50:07 +08:00

7 lines
307 B
TypeScript

// 获取常用时间
import dayjs from 'dayjs';
export const LAST_7_DAYS = [dayjs().subtract(7, 'day').format('YYYY-MM-DD'), dayjs().subtract(1, 'day').format('YYYY-MM-DD')];
export const LAST_30_DAYS = [dayjs().subtract(30, 'day').format('YYYY-MM-DD'), dayjs().subtract(1, 'day').format('YYYY-MM-DD')];