Skip to content

Commit

Permalink
feat(vue-clock): changed 'business days' to just be 'actual days'
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremymwells committed Feb 21, 2024
1 parent 6dba0ff commit 4b2160a
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions scripts/vue2-endoflife-countdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand All @@ -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();
}
Expand Down

0 comments on commit 4b2160a

Please sign in to comment.