From 95023762062e02c4687bab9bdf8f446e1f15412d Mon Sep 17 00:00:00 2001 From: gongbei Date: Mon, 6 Feb 2023 10:21:49 +0800 Subject: [PATCH] fix recommendTimeRangeConverter function case month and year --- frontend/src/app/utils/time.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/utils/time.ts b/frontend/src/app/utils/time.ts index c079ab357..8b6c455d1 100644 --- a/frontend/src/app/utils/time.ts +++ b/frontend/src/app/utils/time.ts @@ -73,10 +73,10 @@ export function recommendTimeRangeConverter(relativeTimeRange) { timeRange = getTimeRange([-90, 0], 'd')('d'); break; case RECOMMEND_TIME.LAST_1_MONTH: - timeRange = getTimeRange()('M'); + timeRange = getTimeRange([-1, 0], 'M')('d'); break; case RECOMMEND_TIME.LAST_1_YEAR: - timeRange = getTimeRange()('y'); + timeRange = getTimeRange([-1, 0], 'y')('d'); break; } return timeRange;