yangyin
2024-10-25 e9060cf8f241536a896d69d0044769bd3b0e8d49
src/utils/util.ts
@@ -464,7 +464,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();