From aeb6b16afbadde39c759803a866570f8cefab117 Mon Sep 17 00:00:00 2001 From: Michael Simard Date: Fri, 31 Jul 2020 23:10:53 -0500 Subject: [PATCH] Fixed month calculation --- Sources/App/Controllers/StatsController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/App/Controllers/StatsController.swift b/Sources/App/Controllers/StatsController.swift index 93b3b91..e8fb424 100644 --- a/Sources/App/Controllers/StatsController.swift +++ b/Sources/App/Controllers/StatsController.swift @@ -136,7 +136,7 @@ struct StatsController: RouteCollection { private func getEndOfMonth(month:Int, year:Int) -> Date { let calendar = Calendar.current var components = DateComponents() - components.day = -1 + components.day = -0 components.timeZone = TimeZone(identifier: "GMT") components.month = month + 1 components.year = year