From b81c973f2eeb52dd47d2f1f45c28064201578f91 Mon Sep 17 00:00:00 2001 From: Brenda Sukh Date: Fri, 4 Dec 2020 10:23:31 -0500 Subject: [PATCH] Add one day to get exclusive date --- plugins/cost-insights/src/utils/duration.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/cost-insights/src/utils/duration.ts b/plugins/cost-insights/src/utils/duration.ts index 2ca2817324..0d9d6aa179 100644 --- a/plugins/cost-insights/src/utils/duration.ts +++ b/plugins/cost-insights/src/utils/duration.ts @@ -85,7 +85,7 @@ function quarterEndDate(inclusiveEndDate: string): string { const endDate = moment(inclusiveEndDate).utc(); const endOfQuarter = endDate.endOf('quarter').format(DEFAULT_DATE_FORMAT); if (endOfQuarter === inclusiveEndDate) { - return inclusiveEndDate; + return endDate.add(1, 'day').format(DEFAULT_DATE_FORMAT); } return endDate.startOf('quarter').format(DEFAULT_DATE_FORMAT); }