Skip to content

Firefly III: a personal finances manager

Fix #2806

James Coleadc4b00f5da7
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);
}