From 9edb3d17debc0b8a2c1bc60c4a94970c8dfac650 Mon Sep 17 00:00:00 2001 From: Tijmen van Nesselrooij Date: Mon, 30 Dec 2024 21:42:58 +0100 Subject: [PATCH] Fix bug in range check --- src/Solar.Api/Services/SolarService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Solar.Api/Services/SolarService.cs b/src/Solar.Api/Services/SolarService.cs index 5ee17fa..74bc3c0 100644 --- a/src/Solar.Api/Services/SolarService.cs +++ b/src/Solar.Api/Services/SolarService.cs @@ -129,7 +129,7 @@ public class SolarService { current = (current.Year, current.Month + 1); } - } while (current.Year < toYear || current.Month < toMonth); + } while (current.Year < toYear || (current.Year == toYear && current.Month <= toMonth)); return new MonthSummariesResponse(results.ToArray()); }