Fixed date calc

master
Christoph 4 years ago
parent 5dd4f398e1
commit 77192cd91b
  1. 6
      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?

Loading…
Cancel
Save