changeset 3373:27aca46771b5

Waterlevel calculation: fixed labels of quarters (again).
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Wed, 22 May 2019 13:14:55 +0200
parents ea49febfbc60
children 7d8c41cc50f5
files pkg/controllers/bottlenecks.go
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/pkg/controllers/bottlenecks.go	Wed May 22 13:04:00 2019 +0200
+++ b/pkg/controllers/bottlenecks.go	Wed May 22 13:14:55 2019 +0200
@@ -687,7 +687,7 @@
 		}
 		f := pfrom
 		pfrom = pfrom.AddDate(0, 3, 0)
-		label := fmt.Sprintf("Q%d-%d", 1+int(f.Month()+1)/4, f.Year())
+		label := fmt.Sprintf("Q%d-%d", (int(f.Month())-1)/3+1, f.Year())
 		return f, f.AddDate(0, 3, 0).Add(-time.Nanosecond), label
 	}
 }