From 77192cd91bff0ff12ae0c58784b72412331544a1 Mon Sep 17 00:00:00 2001 From: Christoph Date: Tue, 1 Jun 2021 07:46:58 +0200 Subject: [PATCH] Fixed date calc --- layouts/shortcodes/dat.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/layouts/shortcodes/dat.html b/layouts/shortcodes/dat.html index a7e7655..a513eee 100644 --- a/layouts/shortcodes/dat.html +++ b/layouts/shortcodes/dat.html @@ -4,9 +4,9 @@ function getNextMeetingDate() { let today = Date.today(); // Are we past the fourth Tuesday of a month? - var secondMonday = today.second().monday(); - var fourthTuesday = today.fourth().tuesday(); - if (today > fourthTuesday) { + var secondMonday = today.clone().second().monday(); + var fourthTuesday = today.clone().fourth().tuesday(); + if (today > fourthTuesday == 1) { var nextDate = (1).months().fromNow().second().monday(); } else if (today <= secondMonday) { // Are we before the second Monday?