From 97a326cb5151f04f2e283943f113e7893730d067 Mon Sep 17 00:00:00 2001 From: Simon Larsen Date: Sun, 3 Dec 2023 15:38:11 +0000 Subject: [PATCH] Refactor date calculation methods in LayerUtil class --- Common/Types/OnCallDutyPolicy/Layer.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Common/Types/OnCallDutyPolicy/Layer.ts b/Common/Types/OnCallDutyPolicy/Layer.ts index b6816b880a..881c14bdf7 100644 --- a/Common/Types/OnCallDutyPolicy/Layer.ts +++ b/Common/Types/OnCallDutyPolicy/Layer.ts @@ -233,7 +233,7 @@ export default class LayerUtil { if(data.rotation.intervalType === EventInterval.Day){ intervalBetweenStartTimeAndHandoffTime = - OneUptimeDate.getDaysBetweenTwoDatesInclusive( + OneUptimeDate.getDaysBetweenTwoDates( handOffTime, data.currentEventStartTime ); @@ -259,7 +259,7 @@ export default class LayerUtil { if(data.rotation.intervalType === EventInterval.Hour){ intervalBetweenStartTimeAndHandoffTime = - OneUptimeDate.getHoursBetweenTwoDatesInclusive( + OneUptimeDate.getHoursBetweenTwoDates( handOffTime, data.currentEventStartTime ); @@ -284,7 +284,7 @@ export default class LayerUtil { if(data.rotation.intervalType === EventInterval.Week){ intervalBetweenStartTimeAndHandoffTime = - OneUptimeDate.getWeeksBetweenTwoDatesInclusive( + OneUptimeDate.getWeeksBetweenTwoDates( handOffTime, data.currentEventStartTime ); @@ -310,7 +310,7 @@ export default class LayerUtil { if(data.rotation.intervalType === EventInterval.Month){ intervalBetweenStartTimeAndHandoffTime = - OneUptimeDate.getMonthsBetweenTwoDatesInclusive( + OneUptimeDate.getMonthsBetweenTwoDates( handOffTime, data.currentEventStartTime @@ -337,7 +337,7 @@ export default class LayerUtil { if(data.rotation.intervalType === EventInterval.Year){ intervalBetweenStartTimeAndHandoffTime = - OneUptimeDate.getYearsBetweenTwoDatesInclusive( + OneUptimeDate.getYearsBetweenTwoDates( handOffTime, data.currentEventStartTime