From adc4b00f5da7338d357ecb415e37943334549a71 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 9 Nov 2019 07:55:59 +0100 Subject: [PATCH] Fix #2806 --- app/Support/Navigation.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Support/Navigation.php b/app/Support/Navigation.php index 17811fe6b4..352a9b68de 100644 --- a/app/Support/Navigation.php +++ b/app/Support/Navigation.php @@ -83,6 +83,7 @@ class Navigation $date->$function($add); // if period is 1M and diff in month is 2 and new DOM > 1, sub a number of days: + // AND skip is 1 // result is: // '2019-01-29', '2019-02-28' // '2019-01-30', '2019-02-28' @@ -90,7 +91,7 @@ class Navigation $months = ['1M', 'month', 'monthly']; $difference = $date->month - $theDate->month; - if (2 === $difference && $date->day > 0 && in_array($repeatFreq, $months, true)) { + if (1 === $add && 2 === $difference && $date->day > 0 && in_array($repeatFreq, $months, true)) { $date->subDays($date->day); }