Skip to content
Snippets Groups Projects
Commit 60168a63 authored by Rémi PAILHAREY's avatar Rémi PAILHAREY :fork_knife_plate:
Browse files

fix: display next month after the 3rd instead of 5th

parent 44c0c06b
No related branches found
No related tags found
2 merge requests!24fix(typo): écogestes + optionnel poll,!22feat: Add partners issue info
Pipeline #18279 passed
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment