I have been researching, but I couldnt find exact solution for my problem. I have been trying to get 1 hour ago from a date. How can I achieve this in swift?
Swift3:
let now = Date() let tempCalendar = Calendar.current let alteredDate = tempCalendar.date(byAdding: .hour, value: -1, to: now)