wujingjing
2024-08-19 d7d1c5b750ee8e496cb29ffd38106b5aa29d32d1
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();