Fixed month calculation

This commit is contained in:
Michael Simard
2020-07-31 23:10:53 -05:00
parent a5540fe844
commit aeb6b16afb

View File

@@ -136,7 +136,7 @@ struct StatsController: RouteCollection {
private func getEndOfMonth(month:Int, year:Int) -> Date { private func getEndOfMonth(month:Int, year:Int) -> Date {
let calendar = Calendar.current let calendar = Calendar.current
var components = DateComponents() var components = DateComponents()
components.day = -1 components.day = -0
components.timeZone = TimeZone(identifier: "GMT") components.timeZone = TimeZone(identifier: "GMT")
components.month = month + 1 components.month = month + 1
components.year = year components.year = year