swift 3 how to get date for tomorrow and yesterday ( take care special case ) new month or new year [duplicate]
You should use Calendar method date(byAdding component:) to do your calendrical calculations using noon time. Doing so you don’t need to worry about those special cases: Swift 3 or Later extension Date { static var yesterday: Date { return Date().dayBefore } static var tomorrow: Date { return Date().dayAfter } var dayBefore: Date { return Calendar.current.date(byAdding: … Read more