From 2f686125dcedd361f407a5be084d3d029d0b3952 Mon Sep 17 00:00:00 2001 From: Lucid Kobold <72232219+LucidKobold@users.noreply.github.com> Date: Sun, 27 Mar 2022 01:42:33 -0500 Subject: [PATCH] Fixed valid date range function. The start date was behind 1 month for testing purposes. --- lib/findValidDateRange.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/findValidDateRange.ts b/lib/findValidDateRange.ts index dec096a..51e5cbd 100644 --- a/lib/findValidDateRange.ts +++ b/lib/findValidDateRange.ts @@ -1,4 +1,4 @@ -import { startOfMonth, endOfMonth, subMonths } from "date-fns"; +import { startOfMonth, endOfMonth } from "date-fns"; interface ValidDateRange { start: Date; @@ -11,7 +11,7 @@ interface ValidDateRange { */ const findValidDateRange = (): ValidDateRange => { const currDate = new Date(); // Current date. - const startDate = subMonths(startOfMonth(currDate), 1); // Will eventually be the creation date of the account or the creation date the selected chart. Whichever is older. + const startDate = startOfMonth(currDate); // Will eventually be the creation date of the account or the creation date the selected chart. Whichever is older. const endDate = endOfMonth(currDate); // Always needs to be the last day on the current month within the current year. return {