fix: remove monthly recurring charging profiles
[e-mobility-charging-stations-simulator.git] / src / charging-station / ChargingStationUtils.ts
index f6119f3da91580ae65aae62aa7abcb5651f54d6b..090ca65d1edcec3648c4fe9f6b3502d3e9097ae6 100644 (file)
@@ -6,19 +6,15 @@ import { fileURLToPath } from 'node:url';
 import chalk from 'chalk';
 import {
   addDays,
-  addMonths,
   addSeconds,
   addWeeks,
-  endOfMonth,
   endOfWeek,
   isAfter,
   isBefore,
   isTomorrow,
   isYesterday,
-  startOfMonth,
   startOfWeek,
   subDays,
-  subMonths,
   subWeeks,
 } from 'date-fns';
 
@@ -712,13 +708,6 @@ const getLimitFromChargingProfiles = (
             subWeeks(chargingSchedule.startSchedule, 1);
           }
           break;
-        case RecurrencyKindType.MONTHLY:
-          if (isBefore(chargingSchedule.startSchedule, startOfMonth(currentDate))) {
-            addMonths(chargingSchedule.startSchedule, 1);
-          } else if (isAfter(chargingSchedule.startSchedule, endOfMonth(currentDate))) {
-            subMonths(chargingSchedule.startSchedule, 1);
-          }
-          break;
       }
     }
     // Check if the charging profile is active