From 60168a63690faedef55d64199f8e5abde8626b0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Pailharey?= <rpailharey@grandlyon.com> Date: Fri, 3 Dec 2021 15:43:17 +0100 Subject: [PATCH] fix: display next month after the 3rd instead of 5th --- src/components/Editing/Editing.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Editing/Editing.tsx b/src/components/Editing/Editing.tsx index 3d3b0aeb..f0ef6d39 100644 --- a/src/components/Editing/Editing.tsx +++ b/src/components/Editing/Editing.tsx @@ -16,10 +16,10 @@ export type ContentItems = 'monthlyInfo' | 'monthlyNews' | 'poll' | '' const Editing: React.FC = () => { // Fonctional rule : - // Display next month after the 5th of the current month + // Display next month after the 3rd of the current month const getCurrentNewsletterDate = (): Date => { let newsletterDate = new Date() - if (newsletterDate.getDate() > 5) { + if (newsletterDate.getDate() >= 3) { newsletterDate.setMonth(newsletterDate.getMonth() + 1) } return newsletterDate -- GitLab