It seems that I can\'t subtract 7 days from the current date. This is how i am doing it:
NSCalendar *gregorian = [[NSCalendar alloc] initWithCalendarIdentifier:N
extension Date { static func -(lhs: Date, rhs: Int) -> Date { return Calendar.current.date(byAdding: .day, value: -rhs, to: lhs)! } }
let today = Date() let yesterday = today - 7