From 3ff11f6cc56abbf31d9e2a5bbb1cb7a54113a2ad Mon Sep 17 00:00:00 2001 From: "Kalle (Sendou)" <38327916+Sendouc@users.noreply.github.com> Date: Sat, 6 Mar 2021 21:17:57 +0200 Subject: [PATCH] adjust plus voting start --- lib/plus.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/plus.ts b/lib/plus.ts index 33ec4a6f9..d2c606d03 100644 --- a/lib/plus.ts +++ b/lib/plus.ts @@ -23,7 +23,7 @@ export const getPercentageFromCounts = ( ); }; -const getSecondFridayDate = (nextMonth?: boolean) => { +const getThirdFridayDate = (nextMonth?: boolean) => { const result = new Date(); if (nextMonth) result.setMonth(result.getMonth() + 1); @@ -37,14 +37,14 @@ const getSecondFridayDate = (nextMonth?: boolean) => { result.setDate(result.getDate() + 1); } - // Get the second Friday - result.setDate(result.getDate() + 7); + // Get the third Friday + result.setDate(result.getDate() + 14); return result; }; export const getVotingRange = () => { - const startDate = getSecondFridayDate(); + const startDate = getThirdFridayDate(); // Get the ending time on Monday const endDate = new Date(startDate); @@ -57,7 +57,7 @@ export const getVotingRange = () => { const nextVotingDate = startDate.getTime() > new Date().getTime() ? startDate - : getSecondFridayDate(true); + : getThirdFridayDate(true); return { startDate, endDate, isHappening, nextVotingDate }; };