) {
chargingSchedule.startSchedule = addDays(
chargingSchedule.startSchedule!,
- differenceInDays(recurringInterval.end, chargingSchedule.startSchedule!),
+ differenceInDays(currentDate, recurringInterval.start),
);
recurringInterval = {
start: chargingSchedule.startSchedule,
) {
chargingSchedule.startSchedule = addWeeks(
chargingSchedule.startSchedule!,
- differenceInWeeks(recurringInterval.end, chargingSchedule.startSchedule!),
+ differenceInWeeks(currentDate, recurringInterval.start),
);
recurringInterval = {
start: chargingSchedule.startSchedule,