update day

This commit is contained in:
Michael Simard
2020-06-15 20:10:17 -05:00
parent 249da53fa7
commit 8dd189bf51

View File

@@ -147,7 +147,7 @@ struct StatsController: RouteCollection {
private func getStartOfDay(day:Int, month:Int, year:Int) -> Date {
let calendar = Calendar.current
var components = DateComponents()
components.day = day - 1
components.day = day
components.month = month
components.year = year
components.hour = 0
@@ -158,7 +158,7 @@ struct StatsController: RouteCollection {
private func getEndOfDay(day:Int, month:Int, year:Int) -> Date {
let calendar = Calendar.current
var components = DateComponents()
components.day = day - 1
components.day = day
components.month = month
components.year = year
components.hour = 23