I need to display the dates of the next Tuesday and the next Thursday from the current date. If the current date is Wednesday then I would need the next Thursday and then the next Tuesday the following week.
I've gone around in circles with solutions like the below but I haven't been able to manipulate these to give me the results I need. Any ideas?
var monday: Date {
return Calendar(identifier: .iso8601).date(from: Calendar(identifier: .iso8601).dateComponents([.yearForWeekOfYear, .weekOfYear], from: Date()))!
}
// Monday, November 6, 2017 at 12:00:00 AM
and
let f = DateFormatter()
f.weekdaySymbols[Calendar.current.component(.weekday, from: Date())]
// Saturday