changeset 5209:32eb35699bd3 new-fwa

Fixed bug in quarter detection.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Mon, 11 May 2020 15:06:44 +0200
parents defca5418446
children da6eb8073f77
files pkg/controllers/fwa.go
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/pkg/controllers/fwa.go	Mon May 11 15:02:15 2020 +0200
+++ b/pkg/controllers/fwa.go	Mon May 11 15:06:44 2020 +0200
@@ -728,9 +728,8 @@
 }
 
 func otherQuarter(t time.Time) func(time.Time) bool {
-	quarter := (t.Month() - 1) / 3
 	return func(x time.Time) bool {
-		flag := quarter != (x.Month()-1)/3
+		flag := (t.Month()-1)/3 != (x.Month()-1)/3
 		if flag {
 			t = x
 		}