From 1e50f1b2e508295cb5924d1dcd1c81f0f750410b Mon Sep 17 00:00:00 2001 From: gras Date: Sun, 31 Mar 2024 19:20:07 +0200 Subject: [PATCH] linting error fix --- src/common/Utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/Utils.ts b/src/common/Utils.ts index a47898ce..4cafa1ad 100644 --- a/src/common/Utils.ts +++ b/src/common/Utils.ts @@ -224,7 +224,7 @@ export class Utils { //this function makes sure that if date is the 31st and you add a month, you will get the last day of the next month //so adding or subtracting a month from 31st of march will give 30th of april or 28th of february respectively (29th on leap years). static addMonthToDate(date: Date, numMonths: number) { - let result = new Date(date) + const result = new Date(date) const expectedMonth = ((date.getMonth() + numMonths) % 12 + 12) % 12; //inner %12 + 12 makes correct handling of negative months result.setMonth(result.getMonth() + numMonths); if (result.getMonth() !== expectedMonth) {