wujingjing
2024-08-19 33657a5f19bde01e9f70ac676cd1f229a1465607
src/utils/util.ts
@@ -541,7 +541,8 @@
 * 最近 n 天的 startDate、endDate
 * @param dates
 */
export const getRecentDateRange = (dates: number) => {
export const getRecentDateRange = (dates: number, includesCurrent = true) => {
   dates = includesCurrent ? dates - 1 : dates;
   // 获取当前日期
   const endDate = new Date();
   const startDate = new Date();