wujingjing
2024-07-26 608be7b1d461138717c4bb34639d9976a605fe0f
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();