From 417d664d87c07afa15eda3d37d5ab78d2734da95 Mon Sep 17 00:00:00 2001 From: Jeremy Wells Date: Thu, 21 Dec 2023 15:58:50 -0500 Subject: [PATCH] feat(vue-clock): changed 'business days' to just be 'actual days' --- scripts/vue2-endoflife-countdown.js | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/scripts/vue2-endoflife-countdown.js b/scripts/vue2-endoflife-countdown.js index 3d07344..0515ee7 100644 --- a/scripts/vue2-endoflife-countdown.js +++ b/scripts/vue2-endoflife-countdown.js @@ -28,17 +28,6 @@ function calculateCountDownTime(targetDate) { seconds, }; - function isWeekend(date) { - const day = date.getDay(); - return day === 0 || day === 6; // Sunday or Saturday - } - - function isHoliday(date) { - // Check if the given date is a holiday based on your holiday calendar - // Implement the logic to check against the list of holidays - return false; - } - function calculateBusinessDaysRemaining() { let currentDateTimestamp = currentDate.getTime(); @@ -47,9 +36,7 @@ function calculateCountDownTime(targetDate) { while (currentDateTimestamp < targetDate) { currentDate.setDate(currentDate.getDate() + 1); - if (!isWeekend(currentDate) && !isHoliday(currentDate)) { - businessDays++; - } + businessDays++; currentDateTimestamp = currentDate.getTime(); }